diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md index 749eabac223b..aeffc9042134 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md @@ -1,408 +1,14 @@ # Release History -## 1.1.0-beta.3 (2026-07-07) - -- Azure Resource Manager HybridCompute client library for Java. This package contains Microsoft Azure SDK for HybridCompute Management SDK. Azure Arc( Servers and K8s Clusters) API reference for Private Link's Scopes management. Package api-version 2025-09-16-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). - -### Breaking Changes - -#### `models.MachineRunCommandsListResult` was removed - -#### `models.ExtensionPublisherListResult` was removed - -#### `models.GatewaysListResult` was removed - -#### `models.ExtensionValueListResult` was removed - -#### `models.PrivateLinkScopesResource` was removed - -#### `models.HybridComputePrivateLinkScopeListResult` was removed - -#### `models.PrivateLinkResourceListResult` was removed - -#### `models.MachineRunCommandUpdate` was removed - -#### `models.ExtensionTypeListResult` was removed - -#### `models.MachineExtensionsListResult` was removed - -#### `models.LicenseProfilesListResult` was removed - -#### `models.PrivateEndpointConnectionListResult` was removed - -#### `models.MachineListResult` was removed - -#### `models.NetworkSecurityPerimeterConfigurationListResult` was removed - -#### `models.LicensesListResult` was removed - -#### `models.OperationListResult` was removed - -#### `models.ExtensionValueListResultV2` was removed - -#### `models.OperationValueDisplay` was modified - -* `OperationValueDisplay()` was changed to private access -* `validate()` was removed - -#### `models.AgentUpgrade` was modified - -* `withCorrelationId(java.util.UUID)` was removed -* `java.util.UUID correlationId()` -> `java.lang.String correlationId()` -* `validate()` was removed - -#### `models.PrivateEndpointConnectionProperties` was modified - -* `validate()` was removed - -#### `models.AgentConfiguration` was modified - -* `AgentConfiguration()` was changed to private access -* `validate()` was removed - -#### `models.MachineExtensionUpgrade` was modified - -* `validate()` was removed - -#### `models.MachineExtensionInstanceView` was modified - -* `validate()` was removed - -#### `models.MachineExtensionProperties` was modified - -* `validate()` was removed - -#### `models.Identity` was modified - -* `validate()` was removed - -#### `models.OSProfile` was modified - -* `validate()` was removed - -#### `models.ServiceStatuses` was modified - -* `validate()` was removed - -#### `models.StorageProfile` was modified - -* `StorageProfile()` was changed to private access -* `withDisks(java.util.List)` was removed -* `validate()` was removed - -#### `models.ProvisioningIssue` was modified - -* `ProvisioningIssue()` was changed to private access -* `validate()` was removed - -#### `models.LicenseProfileUpdate` was modified - -* `validate()` was removed - -#### `models.LocationData` was modified - -* `validate()` was removed - -#### `models.MachineProperties` was modified - -* `java.util.UUID vmId()` -> `java.lang.String vmId()` -* `java.util.UUID vmUuid()` -> `java.lang.String vmUuid()` - -#### `models.PatchSettingsStatus` was modified - -* `PatchSettingsStatus()` was changed to private access -* `withHotpatchEnablementStatus(models.HotpatchEnablementStatus)` was removed -* `validate()` was removed - -#### `models.AccessRule` was modified - -* `AccessRule()` was changed to private access -* `validate()` was removed - -#### `models.ProductFeature` was modified - -* `validate()` was removed - -#### `models.Subnet` was modified - -* `Subnet()` was changed to private access -* `withAddressPrefix(java.lang.String)` was removed -* `validate()` was removed - -#### `models.EsuKey` was modified - -* `EsuKey()` was changed to private access -* `withSku(java.lang.String)` was removed -* `validate()` was removed -* `withLicenseStatus(java.lang.Integer)` was removed - -#### `models.MachineExtensionUpdate` was modified - -* `validate()` was removed - -#### `models.PrivateLinkServiceConnectionStateProperty` was modified - -* `validate()` was removed - -#### `models.LicenseProfileStorageModelEsuProperties` was modified - -* `validate()` was removed - -#### `models.GatewayUpdate` was modified - -* `validate()` was removed - -#### `models.LinuxParameters` was modified - -* `validate()` was removed - -#### `models.PrivateEndpointProperty` was modified - -* `validate()` was removed - -#### `models.ExtensionTargetProperties` was modified - -* `validate()` was removed - -#### `models.PublicNetworkAccessType` was modified - -* `SECURED_BY_PERIMETER` was removed - -#### `models.Processor` was modified - -* `Processor()` was changed to private access -* `validate()` was removed - -#### `models.HybridComputePrivateLinkScopeProperties` was modified - -* `validate()` was removed - -#### `models.ConfigurationExtension` was modified - -* `ConfigurationExtension()` was changed to private access -* `validate()` was removed - -#### `models.NetworkInterface` was modified - -* `NetworkInterface()` was changed to private access -* `withMacAddress(java.lang.String)` was removed -* `withId(java.lang.String)` was removed -* `validate()` was removed -* `withName(java.lang.String)` was removed -* `withIpAddresses(java.util.List)` was removed - -#### `models.ResourceAssociation` was modified - -* `ResourceAssociation()` was changed to private access -* `validate()` was removed - -#### `models.VolumeLicenseDetails` was modified - -* `validate()` was removed - -#### `models.IpAddress` was modified - -* `IpAddress()` was changed to private access -* `withAddress(java.lang.String)` was removed -* `validate()` was removed -* `withIpAddressVersion(java.lang.String)` was removed - -#### `models.MachineUpdate` was modified - -* `validate()` was removed - -#### `models.LicenseProfileArmEsuPropertiesWithoutAssignedLicense` was modified - -* `validate()` was removed - -#### `models.CloudMetadata` was modified - -* `validate()` was removed - -#### `models.NetworkSecurityPerimeterProfile` was modified - -* `NetworkSecurityPerimeterProfile()` was changed to private access -* `validate()` was removed - -#### `models.Disk` was modified - -* `Disk()` was changed to private access -* `withName(java.lang.String)` was removed -* `withDiskType(java.lang.String)` was removed -* `withId(java.lang.String)` was removed -* `withMaxSizeInBytes(java.lang.Long)` was removed -* `withGeneratedId(java.lang.String)` was removed -* `validate()` was removed -* `withUsedSpaceInBytes(java.lang.Long)` was removed -* `withPath(java.lang.String)` was removed - -#### `models.ConnectionDetail` was modified - -* `ConnectionDetail()` was changed to private access -* `validate()` was removed - -#### `models.PrivateEndpointConnectionDataModel` was modified - -* `PrivateEndpointConnectionDataModel()` was changed to private access -* `withProperties(models.PrivateEndpointConnectionProperties)` was removed -* `validate()` was removed - -#### `models.ResourceUpdate` was modified - -* `validate()` was removed - -#### `models.OSProfileLinuxConfiguration` was modified - -* `validate()` was removed - -#### `models.TagsResource` was modified - -* `validate()` was removed - -#### `models.MachineInstallPatchesParameters` was modified - -* `validate()` was removed - -#### `models.ExtensionsResourceStatus` was modified - -* `ExtensionsResourceStatus()` was changed to private access -* `validate()` was removed -* `withCode(java.lang.String)` was removed -* `withTime(java.time.OffsetDateTime)` was removed -* `withDisplayStatus(java.lang.String)` was removed -* `withLevel(models.ExtensionsStatusLevelTypes)` was removed -* `withMessage(java.lang.String)` was removed - -#### `models.ServiceStatus` was modified - -* `validate()` was removed - -#### `models.LicenseUpdate` was modified - -* `validate()` was removed - -#### `models.MachineRunCommandInstanceView` was modified - -* `MachineRunCommandInstanceView()` was changed to private access -* `withEndTime(java.time.OffsetDateTime)` was removed -* `validate()` was removed -* `withError(java.lang.String)` was removed -* `withExecutionState(models.ExecutionState)` was removed -* `withExecutionMessage(java.lang.String)` was removed -* `withStartTime(java.time.OffsetDateTime)` was removed -* `withOutput(java.lang.String)` was removed -* `withExitCode(java.lang.Integer)` was removed -* `withStatuses(java.util.List)` was removed - -#### `models.HardwareProfile` was modified - -* `HardwareProfile()` was changed to private access -* `validate()` was removed - -#### `models.RunCommandManagedIdentity` was modified - -* `validate()` was removed - -#### `models.FirmwareProfile` was modified - -* `FirmwareProfile()` was changed to private access -* `validate()` was removed - -#### `models.Machine` was modified - -* `java.util.UUID vmUuid()` -> `java.lang.String vmUuid()` -* `java.util.UUID vmId()` -> `java.lang.String vmId()` - -#### `models.OSProfileWindowsConfiguration` was modified - -* `validate()` was removed - -#### `models.AvailablePatchCountByClassification` was modified - -* `AvailablePatchCountByClassification()` was changed to private access -* `validate()` was removed - -#### `models.LicenseDetails` was modified - -* `validate()` was removed - -#### `models.ProductFeatureUpdate` was modified - -* `validate()` was removed - -#### `models.MachineRunCommandScriptSource` was modified - -* `validate()` was removed - -#### `models.RunCommandInputParameter` was modified - -* `validate()` was removed - -#### `models.MachineExtensionInstanceViewStatus` was modified - -* `validate()` was removed - -#### `models.PrivateLinkResourceProperties` was modified - -* `PrivateLinkResourceProperties()` was changed to private access -* `validate()` was removed - -#### `models.NetworkSecurityPerimeter` was modified - -* `NetworkSecurityPerimeter()` was changed to private access -* `validate()` was removed - -#### `models.WindowsParameters` was modified - -* `validate()` was removed - -#### `models.MachineAssessPatchesResult` was modified - -* `java.util.UUID assessmentActivityId()` -> `java.lang.String assessmentActivityId()` +## 1.1.0-beta.3 (Unreleased) ### Features Added -* `models.Machine$Update` was added - -* `models.Machine$DefinitionStages` was added - -* `models.ServiceExtensionPublicNetworkAccess` was added - -* `models.ServiceExtension` was added - -* `models.Machine$Definition` was added - -* `models.Machine$UpdateStages` was added - -#### `models.AgentUpgrade` was modified - -* `withCorrelationId(java.lang.String)` was added - -#### `models.NetworkSecurityPerimeterConfiguration` was modified - -* `systemData()` was added - -#### `models.Machines` was modified - -* `define(java.lang.String)` was added -* `getById(java.lang.String)` was added -* `deleteById(java.lang.String)` was added -* `deleteByIdWithResponse(java.lang.String,com.azure.core.util.Context)` was added -* `getByIdWithResponse(java.lang.String,models.InstanceViewTypes,com.azure.core.util.Context)` was added - -#### `models.HybridComputePrivateLinkScopeProperties` was modified - -* `serviceExtensions()` was added -* `withServiceExtensions(java.util.List)` was added +### Breaking Changes -#### `models.Machine` was modified +### Bugs Fixed -* `refresh(com.azure.core.util.Context)` was added -* `update()` was added -* `resourceGroupName()` was added -* `regionName()` was added -* `region()` was added -* `refresh()` was added +### Other Changes ## 1.1.0-beta.2 (2025-06-16) diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/README.md b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/README.md index 1546c4d6baa4..4d362182dfd0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/README.md +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/README.md @@ -2,7 +2,7 @@ Azure Resource Manager HybridCompute client library for Java. -This package contains Microsoft Azure SDK for HybridCompute Management SDK. Azure Arc( Servers and K8s Clusters) API reference for Private Link's Scopes management. Package api-version 2025-09-16-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for HybridCompute Management SDK. The Hybrid Compute Management Client. Package tag package-preview-2025-02-19. 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-hybridcompute - 1.1.0-beta.3 + 1.1.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md index 9f8b52493481..24f8e10e8450 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md @@ -64,13 +64,11 @@ ## Machines - [AssessPatches](#machines_assesspatches) -- [CreateOrUpdate](#machines_createorupdate) - [Delete](#machines_delete) - [GetByResourceGroup](#machines_getbyresourcegroup) - [InstallPatches](#machines_installpatches) - [List](#machines_list) - [ListByResourceGroup](#machines_listbyresourcegroup) -- [Update](#machines_update) ## NetworkProfile @@ -123,21 +121,22 @@ ```java /** - * Samples for ExtensionMetadata Get. + * Samples for Machines AssessPatches. */ -public final class ExtensionMetadataGetSamples { +public final class MachinesAssessPatchesSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionMetadata_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machine_AssessPatches.json */ /** - * Sample code: GET an extensions metadata. + * Sample code: Assess patch state of a machine. * * @param manager Entry point to HybridComputeManager. */ - public static void gETAnExtensionsMetadata(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.extensionMetadatas() - .getWithResponse("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", "1.9.1", - com.azure.core.util.Context.NONE); + public static void + assessPatchStateOfAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines().assessPatches("myResourceGroupName", "myMachineName", com.azure.core.util.Context.NONE); } } ``` @@ -146,19 +145,22 @@ public final class ExtensionMetadataGetSamples { ```java /** - * Samples for ExtensionMetadata List. + * Samples for ExtensionMetadataV2 List. */ -public final class ExtensionMetadataListSamples { +public final class ExtensionMetadataV2ListSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionMetadata_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionMetadataV2_List.json */ /** - * Sample code: GET a list of extensions. + * Sample code: GET a list of extension metadata. * * @param manager Entry point to HybridComputeManager. */ - public static void gETAListOfExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.extensionMetadatas() + public static void + gETAListOfExtensionMetadata(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.extensionMetadataV2s() .list("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", com.azure.core.util.Context.NONE); } } @@ -172,7 +174,9 @@ public final class ExtensionMetadataListSamples { */ public final class ExtensionMetadataV2GetSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionMetadataV2_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionMetadataV2_Get.json */ /** * Sample code: GET an extension metadata. @@ -191,21 +195,21 @@ public final class ExtensionMetadataV2GetSamples { ```java /** - * Samples for ExtensionMetadataV2 List. + * Samples for LicenseProfiles Delete. */ -public final class ExtensionMetadataV2ListSamples { +public final class LicenseProfilesDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionMetadataV2_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_Delete.json */ /** - * Sample code: GET a list of extension metadata. + * Sample code: Delete a License Profile. * * @param manager Entry point to HybridComputeManager. */ - public static void - gETAListOfExtensionMetadata(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.extensionMetadataV2s() - .list("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", com.azure.core.util.Context.NONE); + public static void deleteALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.licenseProfiles().delete("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); } } ``` @@ -214,20 +218,21 @@ public final class ExtensionMetadataV2ListSamples { ```java /** - * Samples for ExtensionPublisher List. + * Samples for Licenses Delete. */ -public final class ExtensionPublisherListSamples { +public final class LicensesDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionPublisher_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_Delete.json */ /** - * Sample code: GET a list of extension publishers. + * Sample code: Delete a License. * * @param manager Entry point to HybridComputeManager. */ - public static void - gETAListOfExtensionPublishers(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.extensionPublishers().list("EastUS", com.azure.core.util.Context.NONE); + public static void deleteALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.licenses().delete("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE); } } ``` @@ -236,19 +241,22 @@ public final class ExtensionPublisherListSamples { ```java /** - * Samples for ExtensionType List. + * Samples for MachineExtensions List. */ -public final class ExtensionTypeListSamples { +public final class MachineExtensionsListSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionType_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_List.json */ /** - * Sample code: GET a list of extension types. + * Sample code: GET all Machine Extensions - List. * * @param manager Entry point to HybridComputeManager. */ - public static void gETAListOfExtensionTypes(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.extensionTypes().list("EastUS", "microsoft.azure.monitor", com.azure.core.util.Context.NONE); + public static void + gETAllMachineExtensionsList(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineExtensions().list("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE); } } ``` @@ -256,29 +264,23 @@ public final class ExtensionTypeListSamples { ### Gateways_CreateOrUpdate ```java -import com.azure.resourcemanager.hybridcompute.models.GatewayType; -import java.util.Arrays; - /** - * Samples for Gateways CreateOrUpdate. + * Samples for ExtensionMetadata List. */ -public final class GatewaysCreateOrUpdateSamples { +public final class ExtensionMetadataListSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionMetadata_List.json */ /** - * Sample code: Create or Update a Gateway. + * Sample code: GET a list of extensions. * * @param manager Entry point to HybridComputeManager. */ - public static void createOrUpdateAGateway(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.gateways() - .define("{gatewayName}") - .withRegion("eastus2euap") - .withExistingResourceGroup("myResourceGroup") - .withGatewayType(GatewayType.PUBLIC) - .withAllowedFeatures(Arrays.asList("*")) - .create(); + public static void gETAListOfExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.extensionMetadatas() + .list("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", com.azure.core.util.Context.NONE); } } ``` @@ -286,20 +288,49 @@ public final class GatewaysCreateOrUpdateSamples { ### Gateways_Delete ```java +import com.azure.resourcemanager.hybridcompute.models.MachineExtensionProperties; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for Gateways Delete. + * Samples for MachineExtensions CreateOrUpdate. */ -public final class GatewaysDeleteSamples { +public final class MachineExtensionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_CreateOrUpdate.json */ /** - * Sample code: Delete a Gateway. + * Sample code: Create or Update a Machine Extension. * * @param manager Entry point to HybridComputeManager. */ - public static void deleteAGateway(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.gateways().delete("myResourceGroup", "{gatewayName}", com.azure.core.util.Context.NONE); + public static void + createOrUpdateAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineExtensions() + .define("CustomScriptExtension") + .withRegion("eastus2euap") + .withExistingMachine("myResourceGroup", "myMachine") + .withProperties( + new MachineExtensionProperties().withPublisher("Microsoft.Compute") + .withType("CustomScriptExtension") + .withTypeHandlerVersion("1.10") + .withSettings(mapOf("commandToExecute", + "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\""))) + .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; } } ``` @@ -308,20 +339,22 @@ public final class GatewaysDeleteSamples { ```java /** - * Samples for Gateways GetByResourceGroup. + * Samples for Machines List. */ -public final class GatewaysGetByResourceGroupSamples { +public final class MachinesListSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_ListBySubscription.json */ /** - * Sample code: Get Gateway. + * Sample code: List Machines by resource group. * * @param manager Entry point to HybridComputeManager. */ - public static void getGateway(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.gateways() - .getByResourceGroupWithResponse("myResourceGroup", "{gatewayName}", com.azure.core.util.Context.NONE); + public static void + listMachinesByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines().list(com.azure.core.util.Context.NONE); } } ``` @@ -330,20 +363,22 @@ public final class GatewaysGetByResourceGroupSamples { ```java /** - * Samples for Gateways List. + * Samples for PrivateLinkScopes Delete. */ -public final class GatewaysListSamples { +public final class PrivateLinkScopesDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_ListBySubscription.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Delete.json */ /** - * Sample code: List Gateways by Subscription. + * Sample code: PrivateLinkScopesDelete. * * @param manager Entry point to HybridComputeManager. */ - public static void - listGatewaysBySubscription(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.gateways().list(com.azure.core.util.Context.NONE); + public static void privateLinkScopesDelete(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkScopes() + .delete("my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE); } } ``` @@ -351,21 +386,39 @@ public final class GatewaysListSamples { ### Gateways_ListByResourceGroup ```java +import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; +import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; +import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; +import com.azure.resourcemanager.hybridcompute.models.LicenseState; +import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; +import com.azure.resourcemanager.hybridcompute.models.LicenseType; + /** - * Samples for Gateways ListByResourceGroup. + * Samples for Licenses CreateOrUpdate. */ -public final class GatewaysListByResourceGroupSamples { +public final class LicensesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_ListByResourceGroup.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_CreateOrUpdate.json */ /** - * Sample code: List Gateways by Resource Group. + * Sample code: Create or Update a License. * * @param manager Entry point to HybridComputeManager. */ - public static void - listGatewaysByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.gateways().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); + public static void createOrUpdateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.licenses() + .define("{licenseName}") + .withRegion("eastus2euap") + .withExistingResourceGroup("myResourceGroup") + .withLicenseType(LicenseType.ESU) + .withLicenseDetails(new LicenseDetails().withState(LicenseState.ACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012) + .withEdition(LicenseEdition.DATACENTER) + .withType(LicenseCoreType.P_CORE) + .withProcessors(6)) + .create(); } } ``` @@ -373,26 +426,22 @@ public final class GatewaysListByResourceGroupSamples { ### Gateways_Update ```java -import com.azure.resourcemanager.hybridcompute.models.Gateway; -import java.util.Arrays; - /** - * Samples for Gateways Update. + * Samples for NetworkProfile Get. */ -public final class GatewaysUpdateSamples { +public final class NetworkProfileGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * NetworkProfile_Get.json */ /** - * Sample code: Update a Gateway. + * Sample code: GET Network Profile. * * @param manager Entry point to HybridComputeManager. */ - public static void updateAGateway(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - Gateway resource = manager.gateways() - .getByResourceGroupWithResponse("myResourceGroup", "{gatewayName}", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withAllowedFeatures(Arrays.asList("*")).apply(); + public static void gETNetworkProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.networkProfiles().getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); } } ``` @@ -400,36 +449,24 @@ public final class GatewaysUpdateSamples { ### LicenseProfiles_CreateOrUpdate ```java -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatus; -import com.azure.resourcemanager.hybridcompute.models.ProductFeature; -import java.util.Arrays; - /** - * Samples for LicenseProfiles CreateOrUpdate. + * Samples for PrivateLinkScopes GetByResourceGroup. */ -public final class LicenseProfilesCreateOrUpdateSamples { +public final class PrivateLinkScopesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Get.json */ /** - * Sample code: Create or Update a License Profile. + * Sample code: PrivateLinkScopeGet. * * @param manager Entry point to HybridComputeManager. */ - public static void - createOrUpdateALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenseProfiles() - .define() - .withRegion("eastus2euap") - .withExistingMachine("myResourceGroup", "myMachine") - .withSoftwareAssuranceCustomer(true) - .withAssignedLicense("{LicenseResourceId}") - .withSubscriptionStatus(LicenseProfileSubscriptionStatus.ENABLED) - .withProductType(LicenseProfileProductType.WINDOWS_SERVER) - .withProductFeatures(Arrays.asList(new ProductFeature().withName("Hotpatch") - .withSubscriptionStatus(LicenseProfileSubscriptionStatus.ENABLED))) - .create(); + public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkScopes() + .getByResourceGroupWithResponse("my-resource-group", "my-privatelinkscope", + com.azure.core.util.Context.NONE); } } ``` @@ -437,20 +474,32 @@ public final class LicenseProfilesCreateOrUpdateSamples { ### LicenseProfiles_Delete ```java +import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnectionStateProperty; + /** - * Samples for LicenseProfiles Delete. + * Samples for PrivateEndpointConnections CreateOrUpdate. */ -public final class LicenseProfilesDeleteSamples { +public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_Update.json */ /** - * Sample code: Delete a License Profile. + * Sample code: Approve or reject a private endpoint connection with a given name. * * @param manager Entry point to HybridComputeManager. */ - public static void deleteALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenseProfiles().delete("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); + public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( + com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateEndpointConnections() + .define("private-endpoint-connection-name") + .withExistingPrivateLinkScope("myResourceGroup", "myPrivateLinkScope") + .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionStateProperty().withStatus("Approved") + .withDescription("Approved by johndoe@contoso.com"))) + .create(); } } ``` @@ -458,20 +507,40 @@ public final class LicenseProfilesDeleteSamples { ### LicenseProfiles_Get ```java +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandScriptSource; +import com.azure.resourcemanager.hybridcompute.models.RunCommandInputParameter; +import java.util.Arrays; + /** - * Samples for LicenseProfiles Get. + * Samples for MachineRunCommands CreateOrUpdate. */ -public final class LicenseProfilesGetSamples { +public final class MachineRunCommandsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * runCommand/RunCommands_CreateOrUpdate.json */ /** - * Sample code: Get License Profile. + * Sample code: Create or Update a Run Command. * * @param manager Entry point to HybridComputeManager. */ - public static void getLicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenseProfiles().getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); + public static void createOrUpdateARunCommand(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineRunCommands() + .define("myRunCommand") + .withRegion("eastus2") + .withExistingMachine("myResourceGroup", "myMachine") + .withSource(new MachineRunCommandScriptSource().withScript("Write-Host Hello World!")) + .withParameters(Arrays.asList(new RunCommandInputParameter().withName("param1").withValue("value1"), + new RunCommandInputParameter().withName("param2").withValue("value2"))) + .withAsyncExecution(false) + .withRunAsUser("user1") + .withRunAsPassword("") + .withTimeoutInSeconds(3600) + .withOutputBlobUri( + "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt") + .withErrorBlobUri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt") + .create(); } } ``` @@ -484,7 +553,9 @@ public final class LicenseProfilesGetSamples { */ public final class LicenseProfilesListSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_List.json */ /** * Sample code: List all License Profiles. @@ -500,36 +571,22 @@ public final class LicenseProfilesListSamples { ### LicenseProfiles_Update ```java -import com.azure.resourcemanager.hybridcompute.models.LicenseProfile; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; -import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; -import java.util.Arrays; - /** - * Samples for LicenseProfiles Update. + * Samples for MachineExtensions Delete. */ -public final class LicenseProfilesUpdateSamples { +public final class MachineExtensionsDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_Delete.json */ /** - * Sample code: Update a License Profile. + * Sample code: Delete a Machine Extension. * * @param manager Entry point to HybridComputeManager. */ - public static void updateALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - LicenseProfile resource = manager.licenseProfiles() - .getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withSoftwareAssuranceCustomer(true) - .withAssignedLicense("{LicenseResourceId}") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE) - .withProductType(LicenseProfileProductType.WINDOWS_SERVER) - .withProductFeaturesForUpdate(Arrays.asList(new ProductFeatureUpdate().withName("Hotpatch") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE))) - .apply(); + public static void deleteAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineExtensions().delete("myResourceGroup", "myMachine", "MMA", com.azure.core.util.Context.NONE); } } ``` @@ -537,37 +594,24 @@ public final class LicenseProfilesUpdateSamples { ### Licenses_CreateOrUpdate ```java -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; - /** - * Samples for Licenses CreateOrUpdate. + * Samples for SettingsOperation Get. */ -public final class LicensesCreateOrUpdateSamples { +public final class SettingsOperationGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/settings + * /SettingsGet.json */ /** - * Sample code: Create or Update a License. + * Sample code: NetworkConfigurationsGet. * * @param manager Entry point to HybridComputeManager. */ - public static void createOrUpdateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses() - .define("{licenseName}") - .withRegion("eastus2euap") - .withExistingResourceGroup("myResourceGroup") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails(new LicenseDetails().withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(6)) - .create(); + public static void networkConfigurationsGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.settingsOperations() + .getWithResponse("hybridRG", "Microsoft.HybridCompute", "machines", "testMachine", "default", + com.azure.core.util.Context.NONE); } } ``` @@ -575,20 +619,38 @@ public final class LicensesCreateOrUpdateSamples { ### Licenses_Delete ```java +import com.azure.resourcemanager.hybridcompute.models.LicenseProfile; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; +import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; +import java.util.Arrays; + /** - * Samples for Licenses Delete. + * Samples for LicenseProfiles Update. */ -public final class LicensesDeleteSamples { +public final class LicenseProfilesUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_Update.json */ /** - * Sample code: Delete a License. + * Sample code: Update a License Profile. * * @param manager Entry point to HybridComputeManager. */ - public static void deleteALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses().delete("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE); + public static void updateALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + LicenseProfile resource = manager.licenseProfiles() + .getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withSoftwareAssuranceCustomer(true) + .withAssignedLicense("{LicenseResourceId}") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE) + .withProductType(LicenseProfileProductType.WINDOWS_SERVER) + .withProductFeaturesForUpdate(Arrays.asList(new ProductFeatureUpdate().withName("Hotpatch") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE))) + .apply(); } } ``` @@ -596,21 +658,29 @@ public final class LicensesDeleteSamples { ### Licenses_GetByResourceGroup ```java +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; + /** - * Samples for Licenses GetByResourceGroup. + * Samples for SettingsOperation Patch. */ -public final class LicensesGetByResourceGroupSamples { +public final class SettingsOperationPatchSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/settings + * /SettingsPatch.json */ /** - * Sample code: Get License. + * Sample code: NetworkConfigurationsPatch. * * @param manager Entry point to HybridComputeManager. */ - public static void getLicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses() - .getByResourceGroupWithResponse("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE); + public static void + networkConfigurationsPatch(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.settingsOperations() + .patchWithResponse("hybridRG", "Microsoft.HybridCompute", "machines", "testMachine", "default", + new SettingsInner().withGatewayResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway"), + com.azure.core.util.Context.NONE); } } ``` @@ -623,7 +693,9 @@ public final class LicensesGetByResourceGroupSamples { */ public final class LicensesListSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_ListBySubscription.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_ListBySubscription.json */ /** * Sample code: List Licenses by Subscription. @@ -641,19 +713,23 @@ public final class LicensesListSamples { ```java /** - * Samples for Licenses ListByResourceGroup. + * Samples for ExtensionMetadata Get. */ -public final class LicensesListByResourceGroupSamples { +public final class ExtensionMetadataGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_ListByResourceGroup.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionMetadata_Get.json */ /** - * Sample code: GET all Machine Extensions. + * Sample code: GET an extensions metadata. * * @param manager Entry point to HybridComputeManager. */ - public static void gETAllMachineExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); + public static void gETAnExtensionsMetadata(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.extensionMetadatas() + .getWithResponse("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", "1.9.1", + com.azure.core.util.Context.NONE); } } ``` @@ -661,37 +737,23 @@ public final class LicensesListByResourceGroupSamples { ### Licenses_Update ```java -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; - /** - * Samples for Licenses Update. + * Samples for Operations List. */ -public final class LicensesUpdateSamples { +public final class OperationsListSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * Operations_List.json */ /** - * Sample code: Update a License. + * Sample code: List Hybrid Compute Provider Operations. * * @param manager Entry point to HybridComputeManager. */ - public static void updateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - License resource = manager.licenses() - .getByResourceGroupWithResponse("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withLicenseType(LicenseType.ESU) - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(6) - .apply(); + public static void + listHybridComputeProviderOperations(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -699,36 +761,23 @@ public final class LicensesUpdateSamples { ### Licenses_ValidateLicense ```java -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; - /** - * Samples for Licenses ValidateLicense. + * Samples for MachineRunCommands Get. */ -public final class LicensesValidateLicenseSamples { +public final class MachineRunCommandsGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_ValidateLicense.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * runCommand/RunCommands_Get.json */ /** - * Sample code: Validate a License. + * Sample code: Get a Run Command. * * @param manager Entry point to HybridComputeManager. */ - public static void validateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses() - .validateLicense(new LicenseInner().withLocation("eastus2euap") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails(new LicenseDetails().withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(6)), - com.azure.core.util.Context.NONE); + public static void getARunCommand(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineRunCommands() + .getWithResponse("myResourceGroup", "myMachine", "myRunCommand", com.azure.core.util.Context.NONE); } } ``` @@ -736,47 +785,23 @@ public final class LicensesValidateLicenseSamples { ### MachineExtensions_CreateOrUpdate ```java -import com.azure.resourcemanager.hybridcompute.models.MachineExtensionProperties; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for MachineExtensions CreateOrUpdate. + * Samples for Gateways ListByResourceGroup. */ -public final class MachineExtensionsCreateOrUpdateSamples { +public final class GatewaysListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_ListByResourceGroup.json */ /** - * Sample code: Create or Update a Machine Extension. + * Sample code: List Gateways by Resource Group. * * @param manager Entry point to HybridComputeManager. */ public static void - createOrUpdateAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machineExtensions() - .define("CustomScriptExtension") - .withRegion("eastus2euap") - .withExistingMachine("myResourceGroup", "myMachine") - .withProperties( - new MachineExtensionProperties().withPublisher("Microsoft.Compute") - .withType("CustomScriptExtension") - .withTypeHandlerVersion("1.10") - .withSettings(mapOf("commandToExecute", - "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\""))) - .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; + listGatewaysByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.gateways().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); } } ``` @@ -785,19 +810,21 @@ public final class MachineExtensionsCreateOrUpdateSamples { ```java /** - * Samples for MachineExtensions Delete. + * Samples for PrivateLinkScopes List. */ -public final class MachineExtensionsDeleteSamples { +public final class PrivateLinkScopesListSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_List.json */ /** - * Sample code: Delete a Machine Extension. + * Sample code: PrivateLinkScopesList.json. * * @param manager Entry point to HybridComputeManager. */ - public static void deleteAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machineExtensions().delete("myResourceGroup", "myMachine", "MMA", com.azure.core.util.Context.NONE); + public static void privateLinkScopesListJson(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkScopes().list(com.azure.core.util.Context.NONE); } } ``` @@ -806,20 +833,21 @@ public final class MachineExtensionsDeleteSamples { ```java /** - * Samples for MachineExtensions Get. + * Samples for LicenseProfiles Get. */ -public final class MachineExtensionsGetSamples { +public final class LicenseProfilesGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_Get.json */ /** - * Sample code: GET Machine Extension. + * Sample code: Get License Profile. * * @param manager Entry point to HybridComputeManager. */ - public static void gETMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machineExtensions() - .getWithResponse("myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE); + public static void getLicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.licenseProfiles().getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); } } ``` @@ -827,57 +855,31 @@ public final class MachineExtensionsGetSamples { ### MachineExtensions_List ```java -/** - * Samples for MachineExtensions List. - */ -public final class MachineExtensionsListSamples { - /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_List.json - */ - /** - * Sample code: GET all Machine Extensions - List. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void - gETAllMachineExtensionsList(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machineExtensions().list("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE); - } -} -``` - -### MachineExtensions_Update - -```java -import com.azure.resourcemanager.hybridcompute.models.MachineExtension; +import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScope; import java.util.HashMap; import java.util.Map; /** - * Samples for MachineExtensions Update. + * Samples for PrivateLinkScopes UpdateTags. */ -public final class MachineExtensionsUpdateSamples { +public final class PrivateLinkScopesUpdateTagsSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json */ /** - * Sample code: Create or Update a Machine Extension. + * Sample code: PrivateLinkScopeUpdateTagsOnly. * * @param manager Entry point to HybridComputeManager. */ public static void - createOrUpdateAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - MachineExtension resource = manager.machineExtensions() - .getWithResponse("myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE) + privateLinkScopeUpdateTagsOnly(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + HybridComputePrivateLinkScope resource = manager.privateLinkScopes() + .getByResourceGroupWithResponse("my-resource-group", "my-privatelinkscope", + com.azure.core.util.Context.NONE) .getValue(); - resource.update() - .withPublisher("Microsoft.Compute") - .withType("CustomScriptExtension") - .withTypeHandlerVersion("1.10") - .withEnableAutomaticUpgrade(true) - .withSettings( - mapOf("commandToExecute", "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -lt 100 }\"")) - .apply(); + resource.update().withTags(mapOf("Tag1", "Value1", "Tag2", "Value2")).apply(); } // Use "Map.of" if available @@ -894,46 +896,36 @@ public final class MachineExtensionsUpdateSamples { } ``` -### MachineRunCommands_CreateOrUpdate +### MachineExtensions_Update ```java -import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandScriptSource; -import com.azure.resourcemanager.hybridcompute.models.RunCommandInputParameter; +import com.azure.resourcemanager.hybridcompute.models.Gateway; import java.util.Arrays; /** - * Samples for MachineRunCommands CreateOrUpdate. + * Samples for Gateways Update. */ -public final class MachineRunCommandsCreateOrUpdateSamples { +public final class GatewaysUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/runCommand/RunCommands_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_Update.json */ /** - * Sample code: Create or Update a Run Command. + * Sample code: Update a Gateway. * * @param manager Entry point to HybridComputeManager. */ - public static void createOrUpdateARunCommand(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machineRunCommands() - .define("myRunCommand") - .withRegion("eastus2") - .withExistingMachine("myResourceGroup", "myMachine") - .withSource(new MachineRunCommandScriptSource().withScript("Write-Host Hello World!")) - .withParameters(Arrays.asList(new RunCommandInputParameter().withName("param1").withValue("value1"), - new RunCommandInputParameter().withName("param2").withValue("value2"))) - .withAsyncExecution(false) - .withRunAsUser("user1") - .withRunAsPassword("") - .withTimeoutInSeconds(3600) - .withOutputBlobUri( - "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt") - .withErrorBlobUri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt") - .create(); + public static void updateAGateway(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + Gateway resource = manager.gateways() + .getByResourceGroupWithResponse("myResourceGroup", "{gatewayName}", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withAllowedFeatures(Arrays.asList("*")).apply(); } } ``` -### MachineRunCommands_Delete +### MachineRunCommands_CreateOrUpdate ```java /** @@ -941,7 +933,9 @@ public final class MachineRunCommandsCreateOrUpdateSamples { */ public final class MachineRunCommandsDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/runCommand/RunCommands_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * runCommand/RunCommands_Delete.json */ /** * Sample code: Delete a Machine Run Command. @@ -955,111 +949,129 @@ public final class MachineRunCommandsDeleteSamples { } ``` -### MachineRunCommands_Get +### MachineRunCommands_Delete ```java /** - * Samples for MachineRunCommands Get. + * Samples for PrivateEndpointConnections Get. */ -public final class MachineRunCommandsGetSamples { +public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/runCommand/RunCommands_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_Get.json */ /** - * Sample code: Get a Run Command. + * Sample code: Gets private endpoint connection. * * @param manager Entry point to HybridComputeManager. */ - public static void getARunCommand(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machineRunCommands() - .getWithResponse("myResourceGroup", "myMachine", "myRunCommand", com.azure.core.util.Context.NONE); + public static void + getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateEndpointConnections() + .getWithResponse("myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", + com.azure.core.util.Context.NONE); } } ``` -### MachineRunCommands_List +### MachineRunCommands_Get ```java /** - * Samples for MachineRunCommands List. + * Samples for NetworkSecurityPerimeterConfigurations ListByPrivateLinkScope. */ -public final class MachineRunCommandsListSamples { +public final class NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeSamples { /* - * x-ms-original-file: 2025-09-16-preview/runCommand/RunCommands_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json */ /** - * Sample code: GET all Machine Run Commands. + * Sample code: Gets the list of network security perimeter configurations of the private link scope. * * @param manager Entry point to HybridComputeManager. */ - public static void gETAllMachineRunCommands(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machineRunCommands().list("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE); + public static void getsTheListOfNetworkSecurityPerimeterConfigurationsOfThePrivateLinkScope( + com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.networkSecurityPerimeterConfigurations() + .listByPrivateLinkScope("my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE); } } ``` -### Machines_AssessPatches +### MachineRunCommands_List ```java /** - * Samples for Machines AssessPatches. + * Samples for PrivateLinkResources Get. */ -public final class MachinesAssessPatchesSamples { +public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machine_AssessPatches.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json */ /** - * Sample code: Assess patch state of a machine. + * Sample code: Gets private endpoint connection. * * @param manager Entry point to HybridComputeManager. */ public static void - assessPatchStateOfAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machines().assessPatches("myResourceGroupName", "myMachineName", com.azure.core.util.Context.NONE); + getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkResources() + .getWithResponse("myResourceGroup", "myPrivateLinkScope", "hybridcompute", + com.azure.core.util.Context.NONE); } } ``` -### Machines_CreateOrUpdate +### Machines_AssessPatches ```java -import com.azure.resourcemanager.hybridcompute.models.Identity; -import com.azure.resourcemanager.hybridcompute.models.IdentityKeyStore; -import com.azure.resourcemanager.hybridcompute.models.LocationData; -import com.azure.resourcemanager.hybridcompute.models.OSProfile; -import com.azure.resourcemanager.hybridcompute.models.OSProfileWindowsConfiguration; -import com.azure.resourcemanager.hybridcompute.models.ResourceIdentityType; +import com.azure.resourcemanager.hybridcompute.models.MachineExtension; +import java.util.HashMap; +import java.util.Map; /** - * Samples for Machines CreateOrUpdate. + * Samples for MachineExtensions Update. */ -public final class MachinesCreateOrUpdateSamples { +public final class MachineExtensionsUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_Update.json */ /** - * Sample code: Create or Update a Machine. + * Sample code: Create or Update a Machine Extension. * * @param manager Entry point to HybridComputeManager. */ - public static void createOrUpdateAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machines() - .define("myMachine") - .withRegion("eastus2euap") - .withExistingResourceGroup("myResourceGroup") - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withLocationData(new LocationData().withName("Redmond")) - .withOsProfile(new OSProfile() - .withWindowsConfiguration(new OSProfileWindowsConfiguration().withEnableHotpatching(true))) - .withVmId("b7a098cc-b0b8-46e8-a205-62f301a62a8f") - .withClientPublicKey("string") - .withIdentityKeyStore(IdentityKeyStore.TPM) - .withTpmEkCertificate("string") - .withPrivateLinkScopeResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName") - .withParentClusterResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.AzureStackHCI/clusters/myAzureStackHCICluster") - .create(); + public static void + createOrUpdateAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + MachineExtension resource = manager.machineExtensions() + .getWithResponse("myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withPublisher("Microsoft.Compute") + .withType("CustomScriptExtension") + .withTypeHandlerVersion("1.10") + .withEnableAutomaticUpgrade(true) + .withSettings( + mapOf("commandToExecute", "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -lt 100 }\"")) + .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; } } ``` @@ -1068,19 +1080,22 @@ public final class MachinesCreateOrUpdateSamples { ```java /** - * Samples for Machines Delete. + * Samples for Machines ListByResourceGroup. */ -public final class MachinesDeleteSamples { +public final class MachinesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_ListByResourceGroup.json */ /** - * Sample code: Delete a Machine. + * Sample code: List Machines by resource group. * * @param manager Entry point to HybridComputeManager. */ - public static void deleteAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machines().delete("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); + public static void + listMachinesByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines().listByResourceGroup("myResourceGroup", null, com.azure.core.util.Context.NONE); } } ``` @@ -1088,78 +1103,57 @@ public final class MachinesDeleteSamples { ### Machines_GetByResourceGroup ```java -import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; +import com.azure.resourcemanager.hybridcompute.fluent.models.SetupExtensionRequestInner; +import com.azure.resourcemanager.hybridcompute.models.MachineExtensionProperties; +import java.util.Arrays; /** - * Samples for Machines GetByResourceGroup. + * Samples for ResourceProvider SetupExtensions. */ -public final class MachinesGetByResourceGroupSamples { +public final class ResourceProviderSetupExtensionsSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_Get_LicenseProfileInstanceView.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_Add.json */ /** - * Sample code: Get Machine with License Profile Instance View. + * Sample code: Setup Machine Extensions. * * @param manager Entry point to HybridComputeManager. */ - public static void - getMachineWithLicenseProfileInstanceView(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machines() - .getByResourceGroupWithResponse("myResourceGroup", "myMachine", InstanceViewTypes.INSTANCE_VIEW, + public static void setupMachineExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.resourceProviders() + .setupExtensions("myResourceGroup", "myMachine", + new SetupExtensionRequestInner().withExtensions(Arrays.asList( + new MachineExtensionProperties().withPublisher("Microsoft.Azure.Monitoring") + .withType("AzureMonitorAgentLinux"), + new MachineExtensionProperties().withPublisher("") + .withType(""))), com.azure.core.util.Context.NONE); } - - /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_Get.json - */ - /** - * Sample code: Get Machine. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void getMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machines() - .getByResourceGroupWithResponse("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE); - } } ``` ### Machines_InstallPatches ```java -import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters; -import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationWindows; -import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchRebootSetting; -import com.azure.resourcemanager.hybridcompute.models.WindowsParameters; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.Arrays; - /** - * Samples for Machines InstallPatches. + * Samples for Gateways GetByResourceGroup. */ -public final class MachinesInstallPatchesSamples { +public final class GatewaysGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machine_InstallPatches.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_Get.json */ /** - * Sample code: Install patch state of a machine. + * Sample code: Get Gateway. * * @param manager Entry point to HybridComputeManager. */ - public static void - installPatchStateOfAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machines() - .installPatches("myResourceGroupName", "myMachineName", - new MachineInstallPatchesParameters().withMaximumDuration(Duration.parse("PT4H")) - .withRebootSetting(VMGuestPatchRebootSetting.IF_REQUIRED) - .withWindowsParameters(new WindowsParameters() - .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.CRITICAL, - VMGuestPatchClassificationWindows.SECURITY)) - .withMaxPatchPublishDate(OffsetDateTime.parse("2021-08-19T02:36:43.0539904+00:00")) - .withPatchNameMasksToInclude(Arrays.asList("*SQL*")) - .withPatchNameMasksToExclude(Arrays.asList("*Windows*"))), - com.azure.core.util.Context.NONE); + public static void getGateway(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.gateways() + .getByResourceGroupWithResponse("myResourceGroup", "{gatewayName}", com.azure.core.util.Context.NONE); } } ``` @@ -1168,20 +1162,22 @@ public final class MachinesInstallPatchesSamples { ```java /** - * Samples for Machines List. + * Samples for MachineExtensions Get. */ -public final class MachinesListSamples { +public final class MachineExtensionsGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_ListBySubscription.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_Get.json */ /** - * Sample code: List Machines by resource group. + * Sample code: GET Machine Extension. * * @param manager Entry point to HybridComputeManager. */ - public static void - listMachinesByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machines().list(com.azure.core.util.Context.NONE); + public static void gETMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineExtensions() + .getWithResponse("myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE); } } ``` @@ -1190,71 +1186,24 @@ public final class MachinesListSamples { ```java /** - * Samples for Machines ListByResourceGroup. - */ -public final class MachinesListByResourceGroupSamples { - /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_ListByResourceGroup.json - */ - /** - * Sample code: List Machines by resource group. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void - listMachinesByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machines().listByResourceGroup("myResourceGroup", null, com.azure.core.util.Context.NONE); - } -} -``` - -### Machines_Update - -```java -import com.azure.resourcemanager.hybridcompute.models.AssessmentModeTypes; -import com.azure.resourcemanager.hybridcompute.models.Identity; -import com.azure.resourcemanager.hybridcompute.models.LocationData; -import com.azure.resourcemanager.hybridcompute.models.Machine; -import com.azure.resourcemanager.hybridcompute.models.OSProfile; -import com.azure.resourcemanager.hybridcompute.models.OSProfileLinuxConfiguration; -import com.azure.resourcemanager.hybridcompute.models.OSProfileWindowsConfiguration; -import com.azure.resourcemanager.hybridcompute.models.PatchModeTypes; -import com.azure.resourcemanager.hybridcompute.models.ResourceIdentityType; - -/** - * Samples for Machines Update. + * Samples for PrivateEndpointConnections Delete. */ -public final class MachinesUpdateSamples { +public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_Delete.json */ /** - * Sample code: Update a Machine. + * Sample code: Deletes a private endpoint connection with a given name. * * @param manager Entry point to HybridComputeManager. - */ - public static void updateAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - Machine resource = manager.machines() - .getByResourceGroupWithResponse("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withLocationData(new LocationData().withName("Redmond")) - .withOsProfile(new OSProfile() - .withWindowsConfiguration( - new OSProfileWindowsConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) - .withPatchMode(PatchModeTypes.AUTOMATIC_BY_PLATFORM) - .withEnableHotpatching(true)) - .withLinuxConfiguration( - new OSProfileLinuxConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) - .withPatchMode(PatchModeTypes.MANUAL))) - .withParentClusterResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.AzureStackHCI/clusters/myAzureStackHCICluster") - .withPrivateLinkScopeResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName") - .withIdentityKeyStore("TPM") - .withTpmEkCertificate("string") - .apply(); + */ + public static void deletesAPrivateEndpointConnectionWithAGivenName( + com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateEndpointConnections() + .delete("myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", + com.azure.core.util.Context.NONE); } } ``` @@ -1263,19 +1212,22 @@ public final class MachinesUpdateSamples { ```java /** - * Samples for NetworkProfile Get. + * Samples for Licenses GetByResourceGroup. */ -public final class NetworkProfileGetSamples { +public final class LicensesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/NetworkProfile_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_Get.json */ /** - * Sample code: GET Network Profile. + * Sample code: Get License. * * @param manager Entry point to HybridComputeManager. */ - public static void gETNetworkProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.networkProfiles().getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); + public static void getLicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.licenses() + .getByResourceGroupWithResponse("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE); } } ``` @@ -1289,7 +1241,8 @@ public final class NetworkProfileGetSamples { public final class NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSamples { /* * x-ms-original-file: - * 2025-09-16-preview/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json */ /** * Sample code: Gets the network security perimeter configuration of the private link scope. @@ -1309,22 +1262,22 @@ public final class NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSa ```java /** - * Samples for NetworkSecurityPerimeterConfigurations ListByPrivateLinkScope. + * Samples for PrivateLinkScopes ListByResourceGroup. */ -public final class NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeSamples { +public final class PrivateLinkScopesListByResourceGroupSamples { /* * x-ms-original-file: - * 2025-09-16-preview/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json */ /** - * Sample code: Gets the list of network security perimeter configurations of the private link scope. + * Sample code: PrivateLinkScopeListByResourceGroup. * * @param manager Entry point to HybridComputeManager. */ - public static void getsTheListOfNetworkSecurityPerimeterConfigurationsOfThePrivateLinkScope( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.networkSecurityPerimeterConfigurations() - .listByPrivateLinkScope("my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE); + public static void + privateLinkScopeListByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkScopes().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } ``` @@ -1332,24 +1285,38 @@ public final class NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeS ### NetworkSecurityPerimeterConfigurations_ReconcileForPrivateLinkScope ```java +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatus; +import com.azure.resourcemanager.hybridcompute.models.ProductFeature; +import java.util.Arrays; + /** - * Samples for NetworkSecurityPerimeterConfigurations ReconcileForPrivateLinkScope. + * Samples for LicenseProfiles CreateOrUpdate. */ -public final class NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSamples { +public final class LicenseProfilesCreateOrUpdateSamples { /* * x-ms-original-file: - * 2025-09-16-preview/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_CreateOrUpdate.json */ /** - * Sample code: Reconciles the network security perimeter configuration of the private link scope. + * Sample code: Create or Update a License Profile. * * @param manager Entry point to HybridComputeManager. */ - public static void reconcilesTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.networkSecurityPerimeterConfigurations() - .reconcileForPrivateLinkScope("my-resource-group", "my-privatelinkscope", - "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee.myAssociation", com.azure.core.util.Context.NONE); + public static void + createOrUpdateALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.licenseProfiles() + .define() + .withRegion("eastus2euap") + .withExistingMachine("myResourceGroup", "myMachine") + .withSoftwareAssuranceCustomer(true) + .withAssignedLicense("{LicenseResourceId}") + .withSubscriptionStatus(LicenseProfileSubscriptionStatus.ENABLED) + .withProductType(LicenseProfileProductType.WINDOWS_SERVER) + .withProductFeatures(Arrays.asList(new ProductFeature().withName("Hotpatch") + .withSubscriptionStatus(LicenseProfileSubscriptionStatus.ENABLED))) + .create(); } } ``` @@ -1358,20 +1325,24 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileForPrivateLink ```java /** - * Samples for Operations List. + * Samples for NetworkSecurityPerimeterConfigurations ReconcileForPrivateLinkScope. */ -public final class OperationsListSamples { +public final class NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSamples { /* - * x-ms-original-file: 2025-09-16-preview/Operations_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json */ /** - * Sample code: List Hybrid Compute Provider Operations. + * Sample code: Reconciles the network security perimeter configuration of the private link scope. * * @param manager Entry point to HybridComputeManager. */ - public static void - listHybridComputeProviderOperations(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void reconcilesTheNetworkSecurityPerimeterConfigurationOfThePrivateLinkScope( + com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.networkSecurityPerimeterConfigurations() + .reconcileForPrivateLinkScope("my-resource-group", "my-privatelinkscope", + "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee.myAssociation", com.azure.core.util.Context.NONE); } } ``` @@ -1379,30 +1350,22 @@ public final class OperationsListSamples { ### PrivateEndpointConnections_CreateOrUpdate ```java -import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnectionStateProperty; - /** - * Samples for PrivateEndpointConnections CreateOrUpdate. + * Samples for Gateways Delete. */ -public final class PrivateEndpointConnectionsCreateOrUpdateSamples { +public final class GatewaysDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateEndpoint/PrivateEndpointConnection_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_Delete.json */ /** - * Sample code: Approve or reject a private endpoint connection with a given name. + * Sample code: Delete a Gateway. * * @param manager Entry point to HybridComputeManager. */ - public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateEndpointConnections() - .define("private-endpoint-connection-name") - .withExistingPrivateLinkScope("myResourceGroup", "myPrivateLinkScope") - .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty().withStatus("Approved") - .withDescription("Approved by johndoe@contoso.com"))) - .create(); + public static void deleteAGateway(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.gateways().delete("myResourceGroup", "{gatewayName}", com.azure.core.util.Context.NONE); } } ``` @@ -1410,23 +1373,31 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { ### PrivateEndpointConnections_Delete ```java +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +import java.util.Arrays; + /** - * Samples for PrivateEndpointConnections Delete. + * Samples for Gateways CreateOrUpdate. */ -public final class PrivateEndpointConnectionsDeleteSamples { +public final class GatewaysCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateEndpoint/PrivateEndpointConnection_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_CreateOrUpdate.json */ /** - * Sample code: Deletes a private endpoint connection with a given name. + * Sample code: Create or Update a Gateway. * * @param manager Entry point to HybridComputeManager. */ - public static void deletesAPrivateEndpointConnectionWithAGivenName( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateEndpointConnections() - .delete("myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", - com.azure.core.util.Context.NONE); + public static void createOrUpdateAGateway(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.gateways() + .define("{gatewayName}") + .withRegion("eastus2euap") + .withExistingResourceGroup("myResourceGroup") + .withGatewayType(GatewayType.PUBLIC) + .withAllowedFeatures(Arrays.asList("*")) + .create(); } } ``` @@ -1435,22 +1406,21 @@ public final class PrivateEndpointConnectionsDeleteSamples { ```java /** - * Samples for PrivateEndpointConnections Get. + * Samples for Machines Delete. */ -public final class PrivateEndpointConnectionsGetSamples { +public final class MachinesDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateEndpoint/PrivateEndpointConnection_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_Delete.json */ /** - * Sample code: Gets private endpoint connection. + * Sample code: Delete a Machine. * * @param manager Entry point to HybridComputeManager. */ - public static void - getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateEndpointConnections() - .getWithResponse("myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", - com.azure.core.util.Context.NONE); + public static void deleteAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines().delete("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); } } ``` @@ -1459,21 +1429,21 @@ public final class PrivateEndpointConnectionsGetSamples { ```java /** - * Samples for PrivateEndpointConnections ListByPrivateLinkScope. + * Samples for MachineRunCommands List. */ -public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { +public final class MachineRunCommandsListSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateEndpoint/PrivateEndpointConnection_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * runCommand/RunCommands_List.json */ /** - * Sample code: Gets list of private endpoint connections on a private link scope. + * Sample code: GET all Machine Run Commands. * * @param manager Entry point to HybridComputeManager. */ - public static void getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateEndpointConnections() - .listByPrivateLinkScope("myResourceGroup", "myPrivateLinkScope", com.azure.core.util.Context.NONE); + public static void gETAllMachineRunCommands(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineRunCommands().list("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE); } } ``` @@ -1481,153 +1451,137 @@ public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { ### PrivateLinkResources_Get ```java +import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; + /** - * Samples for PrivateLinkResources Get. + * Samples for Machines GetByResourceGroup. */ -public final class PrivateLinkResourcesGetSamples { +public final class MachinesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_Get_LicenseProfileInstanceView.json */ /** - * Sample code: Gets private endpoint connection. + * Sample code: Get Machine with License Profile Instance View. * * @param manager Entry point to HybridComputeManager. */ public static void - getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateLinkResources() - .getWithResponse("myResourceGroup", "myPrivateLinkScope", "hybridcompute", + getMachineWithLicenseProfileInstanceView(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines() + .getByResourceGroupWithResponse("myResourceGroup", "myMachine", InstanceViewTypes.INSTANCE_VIEW, com.azure.core.util.Context.NONE); } -} -``` - -### PrivateLinkResources_ListByPrivateLinkScope -```java -/** - * Samples for PrivateLinkResources ListByPrivateLinkScope. - */ -public final class PrivateLinkResourcesListByPrivateLinkScopeSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_Get.json */ /** - * Sample code: Gets private endpoint connection. + * Sample code: Get Machine. * * @param manager Entry point to HybridComputeManager. */ - public static void - getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateLinkResources() - .listByPrivateLinkScope("myResourceGroup", "myPrivateLinkScope", com.azure.core.util.Context.NONE); + public static void getMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines() + .getByResourceGroupWithResponse("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE); } } ``` -### PrivateLinkScopes_CreateOrUpdate +### PrivateLinkResources_ListByPrivateLinkScope ```java -import java.util.HashMap; -import java.util.Map; - /** - * Samples for PrivateLinkScopes CreateOrUpdate. + * Samples for PrivateLinkScopes GetValidationDetailsForMachine. */ -public final class PrivateLinkScopesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_Create.json - */ - /** - * Sample code: PrivateLinkScopeCreate. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void privateLinkScopeCreate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateLinkScopes() - .define("my-privatelinkscope") - .withRegion("westus") - .withExistingResourceGroup("my-resource-group") - .create(); - } - +public final class PrivateLinkScopesGetValidationDetailsForMachineSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json */ /** - * Sample code: PrivateLinkScopeUpdate. + * Sample code: PrivateLinkScopeGet. * * @param manager Entry point to HybridComputeManager. */ - public static void privateLinkScopeUpdate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.privateLinkScopes() - .define("my-privatelinkscope") - .withRegion("westus") - .withExistingResourceGroup("my-resource-group") - .withTags(mapOf("Tag1", "Value1")) - .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; + .getValidationDetailsForMachineWithResponse("my-resource-group", "machineName", + com.azure.core.util.Context.NONE); } } ``` -### PrivateLinkScopes_Delete +### PrivateLinkScopes_CreateOrUpdate ```java /** - * Samples for PrivateLinkScopes Delete. + * Samples for PrivateEndpointConnections ListByPrivateLinkScope. */ -public final class PrivateLinkScopesDeleteSamples { +public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_List.json */ /** - * Sample code: PrivateLinkScopesDelete. + * Sample code: Gets list of private endpoint connections on a private link scope. * * @param manager Entry point to HybridComputeManager. */ - public static void privateLinkScopesDelete(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateLinkScopes() - .delete("my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE); + public static void getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope( + com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateEndpointConnections() + .listByPrivateLinkScope("myResourceGroup", "myPrivateLinkScope", com.azure.core.util.Context.NONE); } } ``` -### PrivateLinkScopes_GetByResourceGroup +### PrivateLinkScopes_Delete ```java +import com.azure.resourcemanager.hybridcompute.models.License; +import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; +import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; +import com.azure.resourcemanager.hybridcompute.models.LicenseState; +import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; +import com.azure.resourcemanager.hybridcompute.models.LicenseType; + /** - * Samples for PrivateLinkScopes GetByResourceGroup. + * Samples for Licenses Update. */ -public final class PrivateLinkScopesGetByResourceGroupSamples { +public final class LicensesUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_Update.json */ /** - * Sample code: PrivateLinkScopeGet. + * Sample code: Update a License. * * @param manager Entry point to HybridComputeManager. */ - public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateLinkScopes() - .getByResourceGroupWithResponse("my-resource-group", "my-privatelinkscope", - com.azure.core.util.Context.NONE); + public static void updateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + License resource = manager.licenses() + .getByResourceGroupWithResponse("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withLicenseType(LicenseType.ESU) + .withState(LicenseState.ACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012) + .withEdition(LicenseEdition.DATACENTER) + .withType(LicenseCoreType.P_CORE) + .withProcessors(6) + .apply(); } } ``` -### PrivateLinkScopes_GetValidationDetails +### PrivateLinkScopes_GetByResourceGroup ```java /** @@ -1635,7 +1589,9 @@ public final class PrivateLinkScopesGetByResourceGroupSamples { */ public final class PrivateLinkScopesGetValidationDetailsSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_GetValidation.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_GetValidation.json */ /** * Sample code: PrivateLinkScopeGet. @@ -1650,98 +1606,100 @@ public final class PrivateLinkScopesGetValidationDetailsSamples { } ``` -### PrivateLinkScopes_GetValidationDetailsForMachine +### PrivateLinkScopes_GetValidationDetails ```java /** - * Samples for PrivateLinkScopes GetValidationDetailsForMachine. + * Samples for Gateways List. */ -public final class PrivateLinkScopesGetValidationDetailsForMachineSamples { +public final class GatewaysListSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_ListBySubscription.json */ /** - * Sample code: PrivateLinkScopeGet. + * Sample code: List Gateways by Subscription. * * @param manager Entry point to HybridComputeManager. */ - public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateLinkScopes() - .getValidationDetailsForMachineWithResponse("my-resource-group", "machineName", - com.azure.core.util.Context.NONE); + public static void + listGatewaysBySubscription(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.gateways().list(com.azure.core.util.Context.NONE); } } ``` -### PrivateLinkScopes_List +### PrivateLinkScopes_GetValidationDetailsForMachine ```java /** - * Samples for PrivateLinkScopes List. + * Samples for PrivateLinkResources ListByPrivateLinkScope. */ -public final class PrivateLinkScopesListSamples { +public final class PrivateLinkResourcesListByPrivateLinkScopeSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json */ /** - * Sample code: PrivateLinkScopesList.json. + * Sample code: Gets private endpoint connection. * * @param manager Entry point to HybridComputeManager. */ - public static void privateLinkScopesListJson(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateLinkScopes().list(com.azure.core.util.Context.NONE); + public static void + getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkResources() + .listByPrivateLinkScope("myResourceGroup", "myPrivateLinkScope", com.azure.core.util.Context.NONE); } } ``` -### PrivateLinkScopes_ListByResourceGroup +### PrivateLinkScopes_List ```java +import java.util.HashMap; +import java.util.Map; + /** - * Samples for PrivateLinkScopes ListByResourceGroup. + * Samples for PrivateLinkScopes CreateOrUpdate. */ -public final class PrivateLinkScopesListByResourceGroupSamples { +public final class PrivateLinkScopesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Create.json */ /** - * Sample code: PrivateLinkScopeListByResourceGroup. + * Sample code: PrivateLinkScopeCreate. * * @param manager Entry point to HybridComputeManager. */ - public static void - privateLinkScopeListByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.privateLinkScopes().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); + public static void privateLinkScopeCreate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkScopes() + .define("my-privatelinkscope") + .withRegion("westus") + .withExistingResourceGroup("my-resource-group") + .create(); } -} -``` - -### PrivateLinkScopes_UpdateTags - -```java -import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScope; -import java.util.HashMap; -import java.util.Map; -/** - * Samples for PrivateLinkScopes UpdateTags. - */ -public final class PrivateLinkScopesUpdateTagsSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Update.json */ /** - * Sample code: PrivateLinkScopeUpdateTagsOnly. + * Sample code: PrivateLinkScopeUpdate. * * @param manager Entry point to HybridComputeManager. */ - public static void - privateLinkScopeUpdateTagsOnly(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - HybridComputePrivateLinkScope resource = manager.privateLinkScopes() - .getByResourceGroupWithResponse("my-resource-group", "my-privatelinkscope", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("Tag1", "Value1", "Tag2", "Value2")).apply(); + public static void privateLinkScopeUpdate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkScopes() + .define("my-privatelinkscope") + .withRegion("westus") + .withExistingResourceGroup("my-resource-group") + .withTags(mapOf("Tag1", "Value1")) + .create(); } // Use "Map.of" if available @@ -1758,39 +1716,59 @@ public final class PrivateLinkScopesUpdateTagsSamples { } ``` -### ResourceProvider_SetupExtensions +### PrivateLinkScopes_ListByResourceGroup ```java -import com.azure.resourcemanager.hybridcompute.fluent.models.SetupExtensionRequestInner; -import com.azure.resourcemanager.hybridcompute.models.MachineExtensionProperties; -import java.util.Arrays; +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; /** - * Samples for ResourceProvider SetupExtensions. + * Samples for SettingsOperation Update. */ -public final class ResourceProviderSetupExtensionsSamples { +public final class SettingsOperationUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_Add.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/settings + * /SettingsUpdate.json */ /** - * Sample code: Setup Machine Extensions. + * Sample code: SettingsUpdate. * * @param manager Entry point to HybridComputeManager. */ - public static void setupMachineExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.resourceProviders() - .setupExtensions("myResourceGroup", "myMachine", - new SetupExtensionRequestInner().withExtensions(Arrays.asList( - new MachineExtensionProperties().withPublisher("Microsoft.Azure.Monitoring") - .withType("AzureMonitorAgentLinux"), - new MachineExtensionProperties().withPublisher("") - .withType(""))), + public static void settingsUpdate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.settingsOperations() + .updateWithResponse("hybridRG", "Microsoft.HybridCompute", "machines", "testMachine", "default", + new SettingsInner().withGatewayResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway"), com.azure.core.util.Context.NONE); } } ``` -### ResourceProvider_UpgradeExtensions +### PrivateLinkScopes_UpdateTags + +```java +/** + * Samples for Licenses ListByResourceGroup. + */ +public final class LicensesListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_ListByResourceGroup.json + */ + /** + * Sample code: GET all Machine Extensions. + * + * @param manager Entry point to HybridComputeManager. + */ + public static void gETAllMachineExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.licenses().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); + } +} +``` + +### ResourceProvider_SetupExtensions ```java import com.azure.resourcemanager.hybridcompute.models.ExtensionTargetProperties; @@ -1803,7 +1781,9 @@ import java.util.Map; */ public final class ResourceProviderUpgradeExtensionsSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extensions_Upgrade.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. @@ -1833,80 +1813,130 @@ public final class ResourceProviderUpgradeExtensionsSamples { } ``` -### SettingsOperation_Get +### ResourceProvider_UpgradeExtensions ```java +import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; +import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; +import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; +import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; +import com.azure.resourcemanager.hybridcompute.models.LicenseState; +import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; +import com.azure.resourcemanager.hybridcompute.models.LicenseType; + /** - * Samples for SettingsOperation Get. + * Samples for Licenses ValidateLicense. */ -public final class SettingsOperationGetSamples { +public final class LicensesValidateLicenseSamples { /* - * x-ms-original-file: 2025-09-16-preview/settings/SettingsGet.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_ValidateLicense.json */ /** - * Sample code: NetworkConfigurationsGet. + * Sample code: Validate a License. * * @param manager Entry point to HybridComputeManager. */ - public static void networkConfigurationsGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.settingsOperations() - .getWithResponse("hybridRG", "Microsoft.HybridCompute", "machines", "testMachine", "default", + public static void validateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.licenses() + .validateLicense(new LicenseInner().withLocation("eastus2euap") + .withLicenseType(LicenseType.ESU) + .withLicenseDetails(new LicenseDetails().withState(LicenseState.ACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012) + .withEdition(LicenseEdition.DATACENTER) + .withType(LicenseCoreType.P_CORE) + .withProcessors(6)), com.azure.core.util.Context.NONE); } } ``` -### SettingsOperation_Patch +### SettingsOperation_Get ```java -import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; +import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters; +import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationWindows; +import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchRebootSetting; +import com.azure.resourcemanager.hybridcompute.models.WindowsParameters; +import java.time.Duration; +import java.time.OffsetDateTime; +import java.util.Arrays; /** - * Samples for SettingsOperation Patch. + * Samples for Machines InstallPatches. */ -public final class SettingsOperationPatchSamples { +public final class MachinesInstallPatchesSamples { /* - * x-ms-original-file: 2025-09-16-preview/settings/SettingsPatch.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machine_InstallPatches.json */ /** - * Sample code: NetworkConfigurationsPatch. + * Sample code: Install patch state of a machine. * * @param manager Entry point to HybridComputeManager. */ public static void - networkConfigurationsPatch(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.settingsOperations() - .patchWithResponse("hybridRG", "Microsoft.HybridCompute", "machines", "testMachine", "default", - new SettingsInner().withGatewayResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway"), + installPatchStateOfAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines() + .installPatches("myResourceGroupName", "myMachineName", + new MachineInstallPatchesParameters().withMaximumDuration(Duration.parse("PT4H")) + .withRebootSetting(VMGuestPatchRebootSetting.IF_REQUIRED) + .withWindowsParameters(new WindowsParameters() + .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.CRITICAL, + VMGuestPatchClassificationWindows.SECURITY)) + .withMaxPatchPublishDate(OffsetDateTime.parse("2021-08-19T02:36:43.0539904+00:00")) + .withPatchNameMasksToInclude(Arrays.asList("*SQL*")) + .withPatchNameMasksToExclude(Arrays.asList("*Windows*"))), com.azure.core.util.Context.NONE); } } ``` -### SettingsOperation_Update +### SettingsOperation_Patch ```java -import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; +/** + * Samples for ExtensionPublisher List. + */ +public final class ExtensionPublisherListSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionPublisher_List.json + */ + /** + * Sample code: GET a list of extension publishers. + * + * @param manager Entry point to HybridComputeManager. + */ + public static void + gETAListOfExtensionPublishers(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.extensionPublishers().list("EastUS", com.azure.core.util.Context.NONE); + } +} +``` + +### SettingsOperation_Update +```java /** - * Samples for SettingsOperation Update. + * Samples for ExtensionType List. */ -public final class SettingsOperationUpdateSamples { +public final class ExtensionTypeListSamples { /* - * x-ms-original-file: 2025-09-16-preview/settings/SettingsUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionType_List.json */ /** - * Sample code: SettingsUpdate. + * Sample code: GET a list of extension types. * * @param manager Entry point to HybridComputeManager. */ - public static void settingsUpdate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.settingsOperations() - .updateWithResponse("hybridRG", "Microsoft.HybridCompute", "machines", "testMachine", "default", - new SettingsInner().withGatewayResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/gateways/newGateway"), - com.azure.core.util.Context.NONE); + public static void gETAListOfExtensionTypes(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.extensionTypes().list("EastUS", "microsoft.azure.monitor", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml index af380e9fb3b1..6c85719b5072 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for HybridCompute Management - This package contains Microsoft Azure SDK for HybridCompute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Arc( Servers and K8s Clusters) API reference for Private Link's Scopes management. Package api-version 2025-09-16-preview. + This package contains Microsoft Azure SDK for HybridCompute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Hybrid Compute Management Client. Package tag package-preview-2025-02-19. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/HybridComputeManager.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/HybridComputeManager.java index 89ca040aa306..c21f53fb9d39 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/HybridComputeManager.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/HybridComputeManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute; @@ -72,13 +72,9 @@ /** * Entry point to HybridComputeManager. - * Azure Arc( Servers and K8s Clusters) API reference for Private Link's Scopes management. + * The Hybrid Compute Management Client. */ public final class HybridComputeManager { - private ResourceProviders resourceProviders; - - private Operations operations; - private Licenses licenses; private Machines machines; @@ -87,29 +83,33 @@ public final class HybridComputeManager { private MachineExtensions machineExtensions; - private MachineRunCommands machineRunCommands; + private ResourceProviders resourceProviders; - private Gateways gateways; + private ExtensionMetadatas extensionMetadatas; - private PrivateLinkResources privateLinkResources; + private ExtensionMetadataV2s extensionMetadataV2s; - private PrivateEndpointConnections privateEndpointConnections; + private ExtensionTypes extensionTypes; - private NetworkSecurityPerimeterConfigurations networkSecurityPerimeterConfigurations; + private ExtensionPublishers extensionPublishers; - private NetworkProfiles networkProfiles; + private Operations operations; - private PrivateLinkScopes privateLinkScopes; + private NetworkProfiles networkProfiles; - private ExtensionMetadatas extensionMetadatas; + private MachineRunCommands machineRunCommands; - private ExtensionMetadataV2s extensionMetadataV2s; + private Gateways gateways; private SettingsOperations settingsOperations; - private ExtensionTypes extensionTypes; + private PrivateLinkScopes privateLinkScopes; - private ExtensionPublishers extensionPublishers; + private PrivateLinkResources privateLinkResources; + + private PrivateEndpointConnections privateEndpointConnections; + + private NetworkSecurityPerimeterConfigurations networkSecurityPerimeterConfigurations; private final HybridComputeManagementClient clientObject; @@ -326,30 +326,6 @@ public HybridComputeManager authenticate(TokenCredential credential, AzureProfil } } - /** - * Gets the resource collection API of ResourceProviders. - * - * @return Resource collection API of ResourceProviders. - */ - public ResourceProviders resourceProviders() { - if (this.resourceProviders == null) { - this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); - } - return resourceProviders; - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - /** * Gets the resource collection API of Licenses. It manages License. * @@ -363,7 +339,7 @@ public Licenses licenses() { } /** - * Gets the resource collection API of Machines. It manages Machine. + * Gets the resource collection API of Machines. * * @return Resource collection API of Machines. */ @@ -399,113 +375,111 @@ public MachineExtensions machineExtensions() { } /** - * Gets the resource collection API of MachineRunCommands. It manages MachineRunCommand. + * Gets the resource collection API of ResourceProviders. * - * @return Resource collection API of MachineRunCommands. + * @return Resource collection API of ResourceProviders. */ - public MachineRunCommands machineRunCommands() { - if (this.machineRunCommands == null) { - this.machineRunCommands = new MachineRunCommandsImpl(clientObject.getMachineRunCommands(), this); + public ResourceProviders resourceProviders() { + if (this.resourceProviders == null) { + this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); } - return machineRunCommands; + return resourceProviders; } /** - * Gets the resource collection API of Gateways. It manages Gateway. + * Gets the resource collection API of ExtensionMetadatas. * - * @return Resource collection API of Gateways. + * @return Resource collection API of ExtensionMetadatas. */ - public Gateways gateways() { - if (this.gateways == null) { - this.gateways = new GatewaysImpl(clientObject.getGateways(), this); + public ExtensionMetadatas extensionMetadatas() { + if (this.extensionMetadatas == null) { + this.extensionMetadatas = new ExtensionMetadatasImpl(clientObject.getExtensionMetadatas(), this); } - return gateways; + return extensionMetadatas; } /** - * Gets the resource collection API of PrivateLinkResources. + * Gets the resource collection API of ExtensionMetadataV2s. * - * @return Resource collection API of PrivateLinkResources. + * @return Resource collection API of ExtensionMetadataV2s. */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + public ExtensionMetadataV2s extensionMetadataV2s() { + if (this.extensionMetadataV2s == null) { + this.extensionMetadataV2s = new ExtensionMetadataV2sImpl(clientObject.getExtensionMetadataV2s(), this); } - return privateLinkResources; + return extensionMetadataV2s; } /** - * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * Gets the resource collection API of ExtensionTypes. * - * @return Resource collection API of PrivateEndpointConnections. + * @return Resource collection API of ExtensionTypes. */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections - = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + public ExtensionTypes extensionTypes() { + if (this.extensionTypes == null) { + this.extensionTypes = new ExtensionTypesImpl(clientObject.getExtensionTypes(), this); } - return privateEndpointConnections; + return extensionTypes; } /** - * Gets the resource collection API of NetworkSecurityPerimeterConfigurations. + * Gets the resource collection API of ExtensionPublishers. * - * @return Resource collection API of NetworkSecurityPerimeterConfigurations. + * @return Resource collection API of ExtensionPublishers. */ - public NetworkSecurityPerimeterConfigurations networkSecurityPerimeterConfigurations() { - if (this.networkSecurityPerimeterConfigurations == null) { - this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsImpl( - clientObject.getNetworkSecurityPerimeterConfigurations(), this); + public ExtensionPublishers extensionPublishers() { + if (this.extensionPublishers == null) { + this.extensionPublishers = new ExtensionPublishersImpl(clientObject.getExtensionPublishers(), this); } - return networkSecurityPerimeterConfigurations; + return extensionPublishers; } /** - * Gets the resource collection API of NetworkProfiles. + * Gets the resource collection API of Operations. * - * @return Resource collection API of NetworkProfiles. + * @return Resource collection API of Operations. */ - public NetworkProfiles networkProfiles() { - if (this.networkProfiles == null) { - this.networkProfiles = new NetworkProfilesImpl(clientObject.getNetworkProfiles(), this); + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); } - return networkProfiles; + return operations; } /** - * Gets the resource collection API of PrivateLinkScopes. It manages HybridComputePrivateLinkScope. + * Gets the resource collection API of NetworkProfiles. * - * @return Resource collection API of PrivateLinkScopes. + * @return Resource collection API of NetworkProfiles. */ - public PrivateLinkScopes privateLinkScopes() { - if (this.privateLinkScopes == null) { - this.privateLinkScopes = new PrivateLinkScopesImpl(clientObject.getPrivateLinkScopes(), this); + public NetworkProfiles networkProfiles() { + if (this.networkProfiles == null) { + this.networkProfiles = new NetworkProfilesImpl(clientObject.getNetworkProfiles(), this); } - return privateLinkScopes; + return networkProfiles; } /** - * Gets the resource collection API of ExtensionMetadatas. + * Gets the resource collection API of MachineRunCommands. It manages MachineRunCommand. * - * @return Resource collection API of ExtensionMetadatas. + * @return Resource collection API of MachineRunCommands. */ - public ExtensionMetadatas extensionMetadatas() { - if (this.extensionMetadatas == null) { - this.extensionMetadatas = new ExtensionMetadatasImpl(clientObject.getExtensionMetadatas(), this); + public MachineRunCommands machineRunCommands() { + if (this.machineRunCommands == null) { + this.machineRunCommands = new MachineRunCommandsImpl(clientObject.getMachineRunCommands(), this); } - return extensionMetadatas; + return machineRunCommands; } /** - * Gets the resource collection API of ExtensionMetadataV2s. + * Gets the resource collection API of Gateways. It manages Gateway. * - * @return Resource collection API of ExtensionMetadataV2s. + * @return Resource collection API of Gateways. */ - public ExtensionMetadataV2s extensionMetadataV2s() { - if (this.extensionMetadataV2s == null) { - this.extensionMetadataV2s = new ExtensionMetadataV2sImpl(clientObject.getExtensionMetadataV2s(), this); + public Gateways gateways() { + if (this.gateways == null) { + this.gateways = new GatewaysImpl(clientObject.getGateways(), this); } - return extensionMetadataV2s; + return gateways; } /** @@ -521,27 +495,53 @@ public SettingsOperations settingsOperations() { } /** - * Gets the resource collection API of ExtensionTypes. + * Gets the resource collection API of PrivateLinkScopes. It manages HybridComputePrivateLinkScope. * - * @return Resource collection API of ExtensionTypes. + * @return Resource collection API of PrivateLinkScopes. */ - public ExtensionTypes extensionTypes() { - if (this.extensionTypes == null) { - this.extensionTypes = new ExtensionTypesImpl(clientObject.getExtensionTypes(), this); + public PrivateLinkScopes privateLinkScopes() { + if (this.privateLinkScopes == null) { + this.privateLinkScopes = new PrivateLinkScopesImpl(clientObject.getPrivateLinkScopes(), this); } - return extensionTypes; + return privateLinkScopes; } /** - * Gets the resource collection API of ExtensionPublishers. + * Gets the resource collection API of PrivateLinkResources. * - * @return Resource collection API of ExtensionPublishers. + * @return Resource collection API of PrivateLinkResources. */ - public ExtensionPublishers extensionPublishers() { - if (this.extensionPublishers == null) { - this.extensionPublishers = new ExtensionPublishersImpl(clientObject.getExtensionPublishers(), this); + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); } - return extensionPublishers; + return privateLinkResources; + } + + /** + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of NetworkSecurityPerimeterConfigurations. + * + * @return Resource collection API of NetworkSecurityPerimeterConfigurations. + */ + public NetworkSecurityPerimeterConfigurations networkSecurityPerimeterConfigurations() { + if (this.networkSecurityPerimeterConfigurations == null) { + this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsImpl( + clientObject.getNetworkSecurityPerimeterConfigurations(), this); + } + return networkSecurityPerimeterConfigurations; } /** diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadataV2sClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadataV2sClient.java index 4f052192b926..da3d414395cf 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadataV2sClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadataV2sClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -18,7 +18,7 @@ public interface ExtensionMetadataV2sClient { /** * Gets an Extension Metadata based on location, publisher, extensionType and version. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param version The version of the Extension being received. @@ -36,7 +36,7 @@ Response getWithResponse(String location, String publishe /** * Gets an Extension Metadata based on location, publisher, extensionType and version. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param version The version of the Extension being received. @@ -51,7 +51,7 @@ Response getWithResponse(String location, String publishe /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,7 +66,7 @@ Response getWithResponse(String location, String publishe /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param context The context to associate with this operation. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadatasClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadatasClient.java index 1c333c7f0773..8f195cf6e387 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadatasClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadatasClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionPublishersClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionPublishersClient.java index 1993c06e9175..8a6b6a30d288 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionPublishersClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionPublishersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -17,7 +17,7 @@ public interface ExtensionPublishersClient { /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -29,7 +29,7 @@ public interface ExtensionPublishersClient { /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionTypesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionTypesClient.java index dbc57a9c8634..192f816d2806 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionTypesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionTypesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -17,7 +17,7 @@ public interface ExtensionTypesClient { /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,7 +30,7 @@ public interface ExtensionTypesClient { /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/GatewaysClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/GatewaysClient.java index ced7baa2b180..cdb671bccda7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/GatewaysClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/GatewaysClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -18,34 +18,6 @@ * An instance of this class provides access to all the operations defined in GatewaysClient. */ public interface GatewaysClient { - /** - * Retrieves information about the view of a gateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the Gateway. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes an Arc Gateway along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String gatewayName, - Context context); - - /** - * Retrieves information about the view of a gateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the Gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes an Arc Gateway. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - GatewayInner getByResourceGroup(String resourceGroupName, String gatewayName); - /** * The operation to create or update a gateway. * @@ -136,6 +108,34 @@ Response updateWithResponse(String resourceGroupName, String gatew @ServiceMethod(returns = ReturnType.SINGLE) GatewayInner update(String resourceGroupName, String gatewayName, GatewayUpdate parameters); + /** + * Retrieves information about the view of a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes an Arc Gateway along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String gatewayName, + Context context); + + /** + * Retrieves information about the view of a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GatewayInner getByResourceGroup(String resourceGroupName, String gatewayName); + /** * The operation to delete a gateway. * @@ -195,7 +195,7 @@ Response updateWithResponse(String resourceGroupName, String gatew * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -208,7 +208,7 @@ Response updateWithResponse(String resourceGroupName, String gatew * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -218,7 +218,7 @@ Response updateWithResponse(String resourceGroupName, String gatew * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -230,7 +230,7 @@ Response updateWithResponse(String resourceGroupName, String gatew * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/HybridComputeManagementClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/HybridComputeManagementClient.java index 823778dc0861..b8c5d41f0c48 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/HybridComputeManagementClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/HybridComputeManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -12,25 +12,25 @@ */ public interface HybridComputeManagementClient { /** - * Gets Service host. + * Gets The ID of the target subscription. * - * @return the endpoint value. + * @return the subscriptionId value. */ - String getEndpoint(); + String getSubscriptionId(); /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - String getApiVersion(); + String getEndpoint(); /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - String getSubscriptionId(); + String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. @@ -46,20 +46,6 @@ public interface HybridComputeManagementClient { */ Duration getDefaultPollInterval(); - /** - * Gets the ResourceProvidersClient object to access its operations. - * - * @return the ResourceProvidersClient object. - */ - ResourceProvidersClient getResourceProviders(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the LicensesClient object to access its operations. * @@ -89,67 +75,67 @@ public interface HybridComputeManagementClient { MachineExtensionsClient getMachineExtensions(); /** - * Gets the MachineRunCommandsClient object to access its operations. + * Gets the ResourceProvidersClient object to access its operations. * - * @return the MachineRunCommandsClient object. + * @return the ResourceProvidersClient object. */ - MachineRunCommandsClient getMachineRunCommands(); + ResourceProvidersClient getResourceProviders(); /** - * Gets the GatewaysClient object to access its operations. + * Gets the ExtensionMetadatasClient object to access its operations. * - * @return the GatewaysClient object. + * @return the ExtensionMetadatasClient object. */ - GatewaysClient getGateways(); + ExtensionMetadatasClient getExtensionMetadatas(); /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the ExtensionMetadataV2sClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the ExtensionMetadataV2sClient object. */ - PrivateLinkResourcesClient getPrivateLinkResources(); + ExtensionMetadataV2sClient getExtensionMetadataV2s(); /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the ExtensionTypesClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the ExtensionTypesClient object. */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + ExtensionTypesClient getExtensionTypes(); /** - * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * Gets the ExtensionPublishersClient object to access its operations. * - * @return the NetworkSecurityPerimeterConfigurationsClient object. + * @return the ExtensionPublishersClient object. */ - NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations(); + ExtensionPublishersClient getExtensionPublishers(); /** - * Gets the NetworkProfilesClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the NetworkProfilesClient object. + * @return the OperationsClient object. */ - NetworkProfilesClient getNetworkProfiles(); + OperationsClient getOperations(); /** - * Gets the PrivateLinkScopesClient object to access its operations. + * Gets the NetworkProfilesClient object to access its operations. * - * @return the PrivateLinkScopesClient object. + * @return the NetworkProfilesClient object. */ - PrivateLinkScopesClient getPrivateLinkScopes(); + NetworkProfilesClient getNetworkProfiles(); /** - * Gets the ExtensionMetadatasClient object to access its operations. + * Gets the MachineRunCommandsClient object to access its operations. * - * @return the ExtensionMetadatasClient object. + * @return the MachineRunCommandsClient object. */ - ExtensionMetadatasClient getExtensionMetadatas(); + MachineRunCommandsClient getMachineRunCommands(); /** - * Gets the ExtensionMetadataV2sClient object to access its operations. + * Gets the GatewaysClient object to access its operations. * - * @return the ExtensionMetadataV2sClient object. + * @return the GatewaysClient object. */ - ExtensionMetadataV2sClient getExtensionMetadataV2s(); + GatewaysClient getGateways(); /** * Gets the SettingsOperationsClient object to access its operations. @@ -159,16 +145,30 @@ public interface HybridComputeManagementClient { SettingsOperationsClient getSettingsOperations(); /** - * Gets the ExtensionTypesClient object to access its operations. + * Gets the PrivateLinkScopesClient object to access its operations. * - * @return the ExtensionTypesClient object. + * @return the PrivateLinkScopesClient object. */ - ExtensionTypesClient getExtensionTypes(); + PrivateLinkScopesClient getPrivateLinkScopes(); /** - * Gets the ExtensionPublishersClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the ExtensionPublishersClient object. + * @return the PrivateLinkResourcesClient object. */ - ExtensionPublishersClient getExtensionPublishers(); + PrivateLinkResourcesClient getPrivateLinkResources(); + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * + * @return the NetworkSecurityPerimeterConfigurationsClient object. + */ + NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicenseProfilesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicenseProfilesClient.java index 10cb7e445295..ea38064c0c65 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicenseProfilesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicenseProfilesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -18,33 +18,6 @@ * An instance of this class provides access to all the operations defined in LicenseProfilesClient. */ public interface LicenseProfilesClient { - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String machineName, Context context); - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseProfileInner get(String resourceGroupName, String machineName); - /** * The operation to create or update a license profile. * @@ -167,6 +140,33 @@ SyncPoller, LicenseProfileInner> beginUpdate(Str LicenseProfileInner update(String resourceGroupName, String machineName, LicenseProfileUpdate parameters, Context context); + /** + * Retrieves information about the view of a license profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String machineName, Context context); + + /** + * Retrieves information about the view of a license profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicenseProfileInner get(String resourceGroupName, String machineName); + /** * The operation to delete a license profile. * @@ -223,11 +223,12 @@ LicenseProfileInner update(String resourceGroupName, String machineName, License * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items as paginated response with {@link PagedIterable}. + * @return the List hybrid machine license profile operation response as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String machineName); @@ -236,12 +237,13 @@ LicenseProfileInner update(String resourceGroupName, String machineName, License * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items as paginated response with {@link PagedIterable}. + * @return the List hybrid machine license profile operation response as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String machineName, Context context); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicensesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicensesClient.java index 6588fb4d2a53..a644026f15df 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicensesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicensesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -19,32 +19,54 @@ */ public interface LicensesClient { /** - * Retrieves information about the view of a license. + * The operation to validate a license. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. + * @param parameters Parameters supplied to the license validation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters); + + /** + * The operation to validate a license. + * + * @param parameters Parameters supplied to the license validation operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response}. + * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters, Context context); + + /** + * The operation to validate a license. + * + * @param parameters Parameters supplied to the license validation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String licenseName, - Context context); + LicenseInner validateLicense(LicenseInner parameters); /** - * Retrieves information about the view of a license. + * The operation to validate a license. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. + * @param parameters Parameters supplied to the license validation operation. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a license in a hybrid machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner getByResourceGroup(String resourceGroupName, String licenseName); + LicenseInner validateLicense(LicenseInner parameters, Context context); /** * The operation to create or update a license. @@ -166,6 +188,34 @@ SyncPoller, LicenseInner> beginUpdate(String resourceGr @ServiceMethod(returns = ReturnType.SINGLE) LicenseInner update(String resourceGroupName, String licenseName, LicenseUpdate parameters, Context context); + /** + * Retrieves information about the view of a license. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String licenseName, + Context context); + + /** + * Retrieves information about the view of a license. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LicenseInner getByResourceGroup(String resourceGroupName, String licenseName); + /** * The operation to delete a license. * @@ -225,7 +275,7 @@ SyncPoller, LicenseInner> 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 paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -238,7 +288,7 @@ SyncPoller, LicenseInner> 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 paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -248,7 +298,7 @@ SyncPoller, LicenseInner> beginUpdate(String resourceGr * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -260,58 +310,8 @@ SyncPoller, LicenseInner> 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 paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters); - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters, Context context); - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner validateLicense(LicenseInner parameters); - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner validateLicense(LicenseInner parameters, Context context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineExtensionsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineExtensionsClient.java index f1dd8e41d172..a2cfd8312a9c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineExtensionsClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineExtensionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -18,41 +18,11 @@ * An instance of this class provides access to all the operations defined in MachineExtensionsClient. */ public interface MachineExtensionsClient { - /** - * The operation to get the extension. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Machine Extension along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String machineName, String extensionName, - Context context); - - /** - * The operation to get the extension. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param extensionName The name of the machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MachineExtensionInner get(String resourceGroupName, String machineName, String extensionName); - /** * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -68,7 +38,7 @@ SyncPoller, MachineExtensionInner> beginCreate * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -85,7 +55,7 @@ SyncPoller, MachineExtensionInner> beginCreate * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -101,7 +71,7 @@ MachineExtensionInner createOrUpdate(String resourceGroupName, String machineNam * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -118,7 +88,7 @@ MachineExtensionInner createOrUpdate(String resourceGroupName, String machineNam * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +104,7 @@ SyncPoller, MachineExtensionInner> beginUpdate * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -151,7 +121,7 @@ SyncPoller, MachineExtensionInner> beginUpdate * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -167,7 +137,7 @@ MachineExtensionInner update(String resourceGroupName, String machineName, Strin * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -184,7 +154,7 @@ MachineExtensionInner update(String resourceGroupName, String machineName, Strin * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -198,7 +168,7 @@ MachineExtensionInner update(String resourceGroupName, String machineName, Strin * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -214,7 +184,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -227,7 +197,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -237,15 +207,45 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String machineName, String extensionName, Context context); + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Machine Extension along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String machineName, String extensionName, + Context context); + + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Machine Extension. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineExtensionInner get(String resourceGroupName, String machineName, String extensionName); + /** * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items as paginated response with {@link PagedIterable}. + * @return describes the Machine Extensions List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String machineName); @@ -254,13 +254,13 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items as paginated response with {@link PagedIterable}. + * @return describes the Machine Extensions List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String machineName, String expand, diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java index 3ad80ca05e61..67f1c56883fd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -17,36 +17,6 @@ * An instance of this class provides access to all the operations defined in MachineRunCommandsClient. */ public interface MachineRunCommandsClient { - /** - * The operation to get a run command. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param runCommandName The name of the run command. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Run Command along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String machineName, - String runCommandName, Context context); - - /** - * The operation to get a run command. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param runCommandName The name of the run command. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Run Command. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MachineRunCommandInner get(String resourceGroupName, String machineName, String runCommandName); - /** * The operation to create or update a run command. * @@ -170,6 +140,36 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String machineName, String runCommandName, Context context); + /** + * The operation to get a run command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Run Command along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String machineName, + String runCommandName, Context context); + + /** + * The operation to get a run command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Run Command. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineRunCommandInner get(String resourceGroupName, String machineName, String runCommandName); + /** * The operation to get all the run commands of a non-Azure machine. * @@ -178,7 +178,7 @@ SyncPoller, Void> beginDelete(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 paged collection of MachineRunCommand items as paginated response with {@link PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String machineName); @@ -193,7 +193,7 @@ SyncPoller, Void> beginDelete(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 paged collection of MachineRunCommand items as paginated response with {@link PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String machineName, String expand, diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachinesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachinesClient.java index 50d428082fc0..a2aa8218000d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachinesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachinesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -16,104 +16,11 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInstallPatchesResultInner; import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters; -import com.azure.resourcemanager.hybridcompute.models.MachineUpdate; /** * An instance of this class provides access to all the operations defined in MachinesClient. */ public interface MachinesClient { - /** - * Retrieves information about the model view or the instance view of a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param expand The expand expression to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, - InstanceViewTypes expand, Context context); - - /** - * Retrieves information about the model view or the instance view of a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MachineInner getByResourceGroup(String resourceGroupName, String machineName); - - /** - * The operation to create or update a hybrid machine. Please note some properties can be set only during machine - * creation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create hybrid machine operation. - * @param expand Expands referenced resources. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String machineName, - MachineInner parameters, String expand, Context context); - - /** - * The operation to create or update a hybrid machine. Please note some properties can be set only during machine - * creation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create hybrid machine operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MachineInner createOrUpdate(String resourceGroupName, String machineName, MachineInner parameters); - - /** - * The operation to update a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update hybrid machine operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String machineName, MachineUpdate parameters, - Context context); - - /** - * The operation to update a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update hybrid machine operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - MachineInner update(String resourceGroupName, String machineName, MachineUpdate parameters); - /** * The operation to delete a hybrid machine. * @@ -167,61 +74,38 @@ Response updateWithResponse(String resourceGroupName, String machi void delete(String resourceGroupName, String machineName, Context context); /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. + * Retrieves information about the model view or the instance view of a hybrid machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand Expands referenced resources. + * @param machineName The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); - - /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedIterable}. + * @return describes a hybrid machine along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, + InstanceViewTypes expand, Context context); /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. + * Retrieves information about the model view or the instance view of a hybrid machine. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid 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 response of a Machine list operation as paginated response with {@link PagedIterable}. + * @return describes a hybrid machine. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + MachineInner getByResourceGroup(String resourceGroupName, String machineName); /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -235,7 +119,7 @@ Response updateWithResponse(String resourceGroupName, String machi /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -250,7 +134,7 @@ Response updateWithResponse(String resourceGroupName, String machi /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -263,7 +147,7 @@ Response updateWithResponse(String resourceGroupName, String machi /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -277,7 +161,7 @@ Response updateWithResponse(String resourceGroupName, String machi /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -292,7 +176,7 @@ Response updateWithResponse(String resourceGroupName, String machi /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @param context The context to associate with this operation. @@ -308,7 +192,7 @@ SyncPoller, MachineInstallPatchesRe /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -323,7 +207,7 @@ MachineInstallPatchesResultInner installPatches(String resourceGroupName, String /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @param context The context to associate with this operation. @@ -335,4 +219,56 @@ MachineInstallPatchesResultInner installPatches(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) MachineInstallPatchesResultInner installPatches(String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput, Context context); + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param expand Expands referenced resources. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkProfilesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkProfilesClient.java index a5e20b73504b..648876e4d161 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkProfilesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkProfilesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkSecurityPerimeterConfigurationsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkSecurityPerimeterConfigurationsClient.java index 4df33ff740f5..375cb93b082a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkSecurityPerimeterConfigurationsClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkSecurityPerimeterConfigurationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -60,8 +60,7 @@ NetworkSecurityPerimeterConfigurationInner getByPrivateLinkScope(String 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 response of a NetworkSecurityPerimeterConfiguration list operation as paginated response with - * {@link PagedIterable}. + * @return a list of network security perimeter configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByPrivateLinkScope(String resourceGroupName, @@ -76,8 +75,7 @@ PagedIterable listByPrivateLinkScope * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NetworkSecurityPerimeterConfiguration list operation as paginated response with - * {@link PagedIterable}. + * @return a list of network security perimeter configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByPrivateLinkScope(String resourceGroupName, @@ -93,7 +91,7 @@ PagedIterable listByPrivateLinkScope * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of result of network security perimeter configurations. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkSecurityPerimeterConfigurationReconcileResultInner> @@ -110,7 +108,7 @@ PagedIterable listByPrivateLinkScope * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return the {@link SyncPoller} for polling of result of network security perimeter configurations. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, NetworkSecurityPerimeterConfigurationReconcileResultInner> @@ -127,7 +125,7 @@ PagedIterable listByPrivateLinkScope * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return result of network security perimeter configurations. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkSecurityPerimeterConfigurationReconcileResultInner reconcileForPrivateLinkScope(String resourceGroupName, @@ -144,7 +142,7 @@ NetworkSecurityPerimeterConfigurationReconcileResultInner reconcileForPrivateLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return result of network security perimeter configurations. */ @ServiceMethod(returns = ReturnType.SINGLE) NetworkSecurityPerimeterConfigurationReconcileResultInner reconcileForPrivateLinkScope(String resourceGroupName, diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/OperationsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/OperationsClient.java index 698f50a9293c..a87f074eaa4c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/OperationsClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateEndpointConnectionsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateEndpointConnectionsClient.java index d5e8c80bbaaf..e8282b570ff4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateEndpointConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkResourcesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkResourcesClient.java index d3d2c49ad301..cd8b7c055cc0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkResourcesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkResourcesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -20,59 +20,59 @@ public interface PrivateLinkResourcesClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param groupName The name of the private link 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link Response}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated + * response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String scopeName, String groupName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param groupName The name of the private link 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated + * response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner get(String resourceGroupName, String scopeName, String groupName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param groupName The name of the private link 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String scopeName, String groupName, + Context context); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param context The context to associate with this operation. + * @param groupName The name of the private link 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 private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner get(String resourceGroupName, String scopeName, String groupName); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkScopesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkScopesClient.java index dff1114b6c97..e09ba79bb901 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkScopesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkScopesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -20,235 +20,235 @@ */ public interface PrivateLinkScopesClient { /** - * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * Gets a list of all Azure Arc PrivateLinkScopes within a 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 all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 response body along with {@link Response}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response - getValidationDetailsForMachineWithResponse(String resourceGroupName, String machineName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** - * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 response. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkScopeValidationDetailsInner getValidationDetailsForMachine(String resourceGroupName, String machineName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Returns a Azure Arc PrivateLinkScope. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Arc PrivateLinkScope 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 an Azure Arc PrivateLinkScope definition along with {@link Response}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String scopeName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Returns a Azure Arc PrivateLinkScope. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope 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 an Azure Arc PrivateLinkScope definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - HybridComputePrivateLinkScopeInner getByResourceGroup(String resourceGroupName, String scopeName); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName); /** - * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String scopeName, - HybridComputePrivateLinkScopeInner parameters, Context context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName, Context context); /** - * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - HybridComputePrivateLinkScopeInner createOrUpdate(String resourceGroupName, String scopeName, - HybridComputePrivateLinkScopeInner parameters); + void delete(String resourceGroupName, String scopeName); /** - * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateTagsWithResponse(String resourceGroupName, String scopeName, - TagsResource privateLinkScopeTags, Context context); + void delete(String resourceGroupName, String scopeName, Context context); /** - * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. + * Returns a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - HybridComputePrivateLinkScopeInner updateTags(String resourceGroupName, String scopeName, - TagsResource privateLinkScopeTags); + Response getByResourceGroupWithResponse(String resourceGroupName, + String scopeName, Context context); /** - * Deletes a Azure Arc PrivateLinkScope. + * Returns a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope 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. + * @return an Azure Arc PrivateLinkScope definition. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName); + @ServiceMethod(returns = ReturnType.SINGLE) + HybridComputePrivateLinkScopeInner getByResourceGroup(String resourceGroupName, String scopeName); /** - * Deletes a Azure Arc PrivateLinkScope. + * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters + * PrivateLinkScope. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String scopeName, + HybridComputePrivateLinkScopeInner parameters, Context context); /** - * Deletes a Azure Arc PrivateLinkScope. + * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters + * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure Arc PrivateLinkScope definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String scopeName); + HybridComputePrivateLinkScopeInner createOrUpdate(String resourceGroupName, String scopeName, + HybridComputePrivateLinkScopeInner parameters); /** - * Deletes a Azure Arc PrivateLinkScope. + * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String scopeName, Context context); + Response updateTagsWithResponse(String resourceGroupName, String scopeName, + TagsResource privateLinkScopeTags, Context context); /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with - * {@link PagedIterable}. + * @return an Azure Arc PrivateLinkScope definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); + @ServiceMethod(returns = ReturnType.SINGLE) + HybridComputePrivateLinkScopeInner updateTags(String resourceGroupName, String scopeName, + TagsResource privateLinkScopeTags); /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Returns a Azure Arc PrivateLinkScope's validation details. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope 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 a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Gets a list of all Azure Arc PrivateLinkScopes within a 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 all Azure Arc PrivateLinkScopes within a subscription as paginated response with - * {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getValidationDetailsWithResponse(String location, + String privateLinkScopeId, Context context); /** - * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * Returns a Azure Arc PrivateLinkScope's validation details. * - * @param context The context to associate with this operation. + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope 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 a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with - * {@link PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkScopeValidationDetailsInner getValidationDetails(String location, String privateLinkScopeId); /** - * Returns a Azure Arc PrivateLinkScope's validation details. + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * - * @param location The name of the Azure region. - * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details for. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -256,19 +256,19 @@ HybridComputePrivateLinkScopeInner updateTags(String resourceGroupName, String s * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getValidationDetailsWithResponse(String location, - String privateLinkScopeId, Context context); + Response + getValidationDetailsForMachineWithResponse(String resourceGroupName, String machineName, Context context); /** - * Returns a Azure Arc PrivateLinkScope's validation details. + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * - * @param location The name of the Azure region. - * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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) - PrivateLinkScopeValidationDetailsInner getValidationDetails(String location, String privateLinkScopeId); + PrivateLinkScopeValidationDetailsInner getValidationDetailsForMachine(String resourceGroupName, String machineName); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ResourceProvidersClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ResourceProvidersClient.java index abdd06b38b35..19854a195223 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ResourceProvidersClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ResourceProvidersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/SettingsOperationsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/SettingsOperationsClient.java index 4295bdcbf28c..3e3fa0f8b16d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/SettingsOperationsClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/SettingsOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent; @@ -26,8 +26,7 @@ public interface SettingsOperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, @@ -44,7 +43,7 @@ Response getWithResponse(String resourceGroupName, String basePro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) SettingsInner get(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, @@ -63,8 +62,7 @@ SettingsInner get(String resourceGroupName, String baseProvider, String baseReso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, @@ -82,7 +80,7 @@ Response updateWithResponse(String resourceGroupName, String base * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) SettingsInner update(String resourceGroupName, String baseProvider, String baseResourceType, @@ -101,8 +99,7 @@ SettingsInner update(String resourceGroupName, String baseProvider, String baseR * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response patchWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, @@ -120,7 +117,7 @@ Response patchWithResponse(String resourceGroupName, String baseP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) SettingsInner patch(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AccessRuleProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AccessRuleProperties.java index 55176898b07f..54486e243a74 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AccessRuleProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AccessRuleProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -31,7 +31,7 @@ public final class AccessRuleProperties implements JsonSerializable addressPrefixes() { return this.addressPrefixes; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/EsuProfileUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/EsuProfileUpdateProperties.java index f61fd542565d..24e44b76e845 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/EsuProfileUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/EsuProfileUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -47,6 +47,14 @@ public EsuProfileUpdateProperties withAssignedLicense(String assignedLicense) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionPublisherInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionPublisherInner.java index 6b85798fdfd1..e9e32b1d176f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionPublisherInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionPublisherInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Describes an Extension Publisher. */ -@Immutable +@Fluent public final class ExtensionPublisherInner implements JsonSerializable { /* * The ID of the extension publisher. @@ -29,7 +29,7 @@ public final class ExtensionPublisherInner implements JsonSerializable { /* * The ID of the extension type. @@ -29,7 +29,7 @@ public final class ExtensionTypeInner implements JsonSerializable allowedFeatures) { 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/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayProperties.java index a39d53e0f044..b83f7e506498 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -117,6 +117,14 @@ public GatewayProperties withAllowedFeatures(List allowedFeatures) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayUpdateProperties.java index ce3efc56a876..98a1c16497c3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -48,6 +48,14 @@ public GatewayUpdateProperties withAllowedFeatures(List allowedFeatures) return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridComputePrivateLinkScopeInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridComputePrivateLinkScopeInner.java index 02e9afcc2f75..52e000d3773e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridComputePrivateLinkScopeInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridComputePrivateLinkScopeInner.java @@ -1,16 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.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.hybridcompute.models.HybridComputePrivateLinkScopeProperties; +import com.azure.resourcemanager.hybridcompute.models.PrivateLinkScopesResource; import java.io.IOException; import java.util.Map; @@ -18,14 +18,14 @@ * An Azure Arc PrivateLinkScope definition. */ @Fluent -public final class HybridComputePrivateLinkScopeInner extends Resource { +public final class HybridComputePrivateLinkScopeInner extends PrivateLinkScopesResource { /* * Properties that define a Azure Arc PrivateLinkScope resource. */ private HybridComputePrivateLinkScopeProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The system meta data relating to this resource. */ private SystemData systemData; @@ -71,7 +71,7 @@ public HybridComputePrivateLinkScopeInner withProperties(HybridComputePrivateLin } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: The system meta data relating to this resource. * * @return the systemData value. */ @@ -127,6 +127,18 @@ public HybridComputePrivateLinkScopeInner withTags(Map tags) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseInner.java index 00d47a6fc6ed..e073d341a48c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -196,6 +196,17 @@ public LicenseInner withLicenseDetails(LicenseDetails licenseDetails) { 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/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmEsuProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmEsuProperties.java index e8f53680d3dd..759c2c434f9a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmEsuProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmEsuProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -127,6 +127,18 @@ public String assignedLicenseImmutableId() { return this.assignedLicenseImmutableId; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (esuKeys() != null) { + esuKeys().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmProductProfileProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmProductProfileProperties.java index 054ad536f135..a167d6ffe88b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmProductProfileProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmProductProfileProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -176,6 +176,17 @@ public LicenseProfileArmProductProfileProperties withProductFeatures(List e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileInner.java index 55560564a644..f43ddcb4245e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -342,6 +342,17 @@ public LicenseProfileInner withProductFeatures(List productFeatu 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/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewEsuPropertiesInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewEsuPropertiesInner.java index 5b616b70a970..8c64f552737c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewEsuPropertiesInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewEsuPropertiesInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -155,6 +155,21 @@ public String assignedLicenseImmutableId() { return this.assignedLicenseImmutableId; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (assignedLicense() != null) { + assignedLicense().validate(); + } + if (esuKeys() != null) { + esuKeys().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewInner.java index 4b4e24bada39..b2271d17e5ec 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -122,6 +122,21 @@ public Boolean softwareAssuranceCustomer() { return this.innerSoftwareAssurance() == null ? null : this.innerSoftwareAssurance().softwareAssuranceCustomer(); } + /** + * Set the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @param softwareAssuranceCustomer the softwareAssuranceCustomer value to set. + * @return the LicenseProfileMachineInstanceViewInner object itself. + */ + public LicenseProfileMachineInstanceViewInner withSoftwareAssuranceCustomer(Boolean softwareAssuranceCustomer) { + if (this.innerSoftwareAssurance() == null) { + this.innerSoftwareAssurance = new LicenseProfileMachineInstanceViewSoftwareAssurance(); + } + this.innerSoftwareAssurance().withSoftwareAssuranceCustomer(softwareAssuranceCustomer); + return this; + } + /** * Get the subscriptionStatus property: Indicates the subscription status of the product. * @@ -131,6 +146,21 @@ public LicenseProfileSubscriptionStatus subscriptionStatus() { return this.innerProductProfile() == null ? null : this.innerProductProfile().subscriptionStatus(); } + /** + * Set the subscriptionStatus property: Indicates the subscription status of the product. + * + * @param subscriptionStatus the subscriptionStatus value to set. + * @return the LicenseProfileMachineInstanceViewInner object itself. + */ + public LicenseProfileMachineInstanceViewInner + withSubscriptionStatus(LicenseProfileSubscriptionStatus subscriptionStatus) { + if (this.innerProductProfile() == null) { + this.innerProductProfile = new LicenseProfileArmProductProfileProperties(); + } + this.innerProductProfile().withSubscriptionStatus(subscriptionStatus); + return this; + } + /** * Get the productType property: Indicates the product type of the license. * @@ -140,6 +170,20 @@ public LicenseProfileProductType productType() { return this.innerProductProfile() == null ? null : this.innerProductProfile().productType(); } + /** + * Set the productType property: Indicates the product type of the license. + * + * @param productType the productType value to set. + * @return the LicenseProfileMachineInstanceViewInner object itself. + */ + public LicenseProfileMachineInstanceViewInner withProductType(LicenseProfileProductType productType) { + if (this.innerProductProfile() == null) { + this.innerProductProfile = new LicenseProfileArmProductProfileProperties(); + } + this.innerProductProfile().withProductType(productType); + return this; + } + /** * Get the enrollmentDate property: The timestamp in UTC when the user enrolls the feature. * @@ -194,6 +238,37 @@ public List productFeatures() { return this.innerProductProfile() == null ? null : this.innerProductProfile().productFeatures(); } + /** + * Set the productFeatures property: The list of product features. + * + * @param productFeatures the productFeatures value to set. + * @return the LicenseProfileMachineInstanceViewInner object itself. + */ + public LicenseProfileMachineInstanceViewInner withProductFeatures(List productFeatures) { + if (this.innerProductProfile() == null) { + this.innerProductProfile = new LicenseProfileArmProductProfileProperties(); + } + this.innerProductProfile().withProductFeatures(productFeatures); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerSoftwareAssurance() != null) { + innerSoftwareAssurance().validate(); + } + if (esuProfile() != null) { + esuProfile().validate(); + } + if (innerProductProfile() != null) { + innerProductProfile().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewSoftwareAssurance.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewSoftwareAssurance.java index be3842c03fcd..93f6ca1beeba 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewSoftwareAssurance.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewSoftwareAssurance.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The LicenseProfileMachineInstanceViewSoftwareAssurance model. */ -@Immutable +@Fluent public final class LicenseProfileMachineInstanceViewSoftwareAssurance implements JsonSerializable { /* @@ -25,7 +25,7 @@ public final class LicenseProfileMachineInstanceViewSoftwareAssurance /** * Creates an instance of LicenseProfileMachineInstanceViewSoftwareAssurance class. */ - private LicenseProfileMachineInstanceViewSoftwareAssurance() { + public LicenseProfileMachineInstanceViewSoftwareAssurance() { } /** @@ -38,6 +38,27 @@ public Boolean softwareAssuranceCustomer() { return this.softwareAssuranceCustomer; } + /** + * Set the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @param softwareAssuranceCustomer the softwareAssuranceCustomer value to set. + * @return the LicenseProfileMachineInstanceViewSoftwareAssurance object itself. + */ + public LicenseProfileMachineInstanceViewSoftwareAssurance + withSoftwareAssuranceCustomer(Boolean softwareAssuranceCustomer) { + this.softwareAssuranceCustomer = softwareAssuranceCustomer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileProperties.java index 4b00712f2372..a09cc40ca14b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -296,6 +296,23 @@ public LicenseProfileProperties withProductFeatures(List product return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerSoftwareAssurance() != null) { + innerSoftwareAssurance().validate(); + } + if (innerEsuProfile() != null) { + innerEsuProfile().validate(); + } + if (innerProductProfile() != null) { + innerProductProfile().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfilePropertiesSoftwareAssurance.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfilePropertiesSoftwareAssurance.java index a79e9c8867c5..37e1cde1a5b4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfilePropertiesSoftwareAssurance.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfilePropertiesSoftwareAssurance.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -50,6 +50,14 @@ public LicenseProfilePropertiesSoftwareAssurance withSoftwareAssuranceCustomer(B return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdateProperties.java index 093bea7510ac..cafc22879b76 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -186,6 +186,23 @@ public LicenseProfileUpdateProperties withProductFeatures(List { /* * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At @@ -33,7 +34,7 @@ public final class MachineAssessPatchesResultInner implements JsonSerializable UUID.fromString(nonNullReader.getString())); } else if ("rebootPending".equals(fieldName)) { deserializedMachineAssessPatchesResultInner.rebootPending = reader.getNullable(JsonReader::getBoolean); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionInner.java index 3a5b66745eb2..3e36535450d9 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -127,6 +127,17 @@ public MachineExtensionInner withTags(Map tags) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionUpdateProperties.java index 61463f4d9010..9e5f0c31e83e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -237,6 +237,14 @@ public MachineExtensionUpdateProperties withProtectedSettings(Map e.validate()); + } + if (identity() != null) { + identity().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInstallPatchesResultInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInstallPatchesResultInner.java index 0a316849326a..7f4f51304335 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInstallPatchesResultInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInstallPatchesResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -104,7 +104,7 @@ public final class MachineInstallPatchesResultInner implements JsonSerializable< /** * Creates an instance of MachineInstallPatchesResultInner class. */ - private MachineInstallPatchesResultInner() { + public MachineInstallPatchesResultInner() { } /** @@ -250,6 +250,14 @@ public ManagementError errorDetails() { return this.errorDetails; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachinePropertiesInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachinePropertiesInner.java index 21885ef4f4b1..93cd81d5e3a4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachinePropertiesInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachinePropertiesInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -27,6 +27,8 @@ import java.time.OffsetDateTime; import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.UUID; /** * Describes the properties of a hybrid machine. @@ -111,7 +113,7 @@ public final class MachinePropertiesInner implements JsonSerializable e.validate()); + } + if (networkProfile() != null) { + networkProfile().validate(); + } + } + /** * {@inheritDoc} */ @@ -757,7 +803,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("agentUpgrade", this.agentUpgrade); jsonWriter.writeJsonField("osProfile", this.osProfile); jsonWriter.writeJsonField("licenseProfile", this.licenseProfile); - jsonWriter.writeStringField("vmId", this.vmId); + jsonWriter.writeStringField("vmId", Objects.toString(this.vmId, null)); jsonWriter.writeStringField("clientPublicKey", this.clientPublicKey); jsonWriter.writeStringField("identityKeyStore", this.identityKeyStore == null ? null : this.identityKeyStore.toString()); @@ -820,7 +866,8 @@ public static MachinePropertiesInner fromJson(JsonReader jsonReader) throws IOEx } else if ("agentVersion".equals(fieldName)) { deserializedMachinePropertiesInner.agentVersion = reader.getString(); } else if ("vmId".equals(fieldName)) { - deserializedMachinePropertiesInner.vmId = reader.getString(); + deserializedMachinePropertiesInner.vmId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("displayName".equals(fieldName)) { deserializedMachinePropertiesInner.displayName = reader.getString(); } else if ("machineFqdn".equals(fieldName)) { @@ -839,7 +886,8 @@ public static MachinePropertiesInner fromJson(JsonReader jsonReader) throws IOEx } else if ("osType".equals(fieldName)) { deserializedMachinePropertiesInner.osType = reader.getString(); } else if ("vmUuid".equals(fieldName)) { - deserializedMachinePropertiesInner.vmUuid = reader.getString(); + deserializedMachinePropertiesInner.vmUuid + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("extensions".equals(fieldName)) { List extensions = reader.readArray(reader1 -> MachineExtensionInstanceView.fromJson(reader1)); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandInner.java index 939a5abfa518..a882f089168a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -419,6 +419,17 @@ public MachineRunCommandInstanceView instanceView() { return this.innerProperties() == null ? null : this.innerProperties().instanceView(); } + /** + * 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/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandProperties.java index b97eb9cdc077..3cfc397f4311 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -373,6 +373,32 @@ public MachineRunCommandInstanceView instanceView() { return this.instanceView; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (source() != null) { + source().validate(); + } + if (parameters() != null) { + parameters().forEach(e -> e.validate()); + } + if (protectedParameters() != null) { + protectedParameters().forEach(e -> e.validate()); + } + if (outputBlobManagedIdentity() != null) { + outputBlobManagedIdentity().validate(); + } + if (errorBlobManagedIdentity() != null) { + errorBlobManagedIdentity().validate(); + } + if (instanceView() != null) { + instanceView().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineUpdateProperties.java index 60eedee4d745..b233e51273d2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -233,6 +233,26 @@ public MachineUpdateProperties withTpmEkCertificate(String tpmEkCertificate) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (locationData() != null) { + locationData().validate(); + } + if (osProfile() != null) { + osProfile().validate(); + } + if (cloudMetadata() != null) { + cloudMetadata().validate(); + } + if (agentUpgrade() != null) { + agentUpgrade().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkProfileInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkProfileInner.java index 69bc7de300c5..0642bcea9b38 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkProfileInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkProfileInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Describes the network information on this machine. */ -@Immutable +@Fluent public final class NetworkProfileInner implements JsonSerializable { /* * The list of network interfaces. @@ -26,7 +26,7 @@ public final class NetworkProfileInner implements JsonSerializable networkInterfaces() { return this.networkInterfaces; } + /** + * Set the networkInterfaces property: The list of network interfaces. + * + * @param networkInterfaces the networkInterfaces value to set. + * @return the NetworkProfileInner object itself. + */ + public NetworkProfileInner withNetworkInterfaces(List networkInterfaces) { + this.networkInterfaces = networkInterfaces; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkInterfaces() != null) { + networkInterfaces().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("networkInterfaces", this.networkInterfaces, + (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationInner.java index d4e812d1571b..9ce77df5b40e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationInner.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,18 +19,13 @@ /** * Properties that define a Network Security Perimeter resource. */ -@Immutable +@Fluent public final class NetworkSecurityPerimeterConfigurationInner extends ProxyResource { /* * Properties that define a Network Security Perimeter resource. */ private NetworkSecurityPerimeterConfigurationProperties innerProperties; - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - /* * The type of the resource. */ @@ -50,7 +44,7 @@ public final class NetworkSecurityPerimeterConfigurationInner extends ProxyResou /** * Creates an instance of NetworkSecurityPerimeterConfigurationInner class. */ - private NetworkSecurityPerimeterConfigurationInner() { + public NetworkSecurityPerimeterConfigurationInner() { } /** @@ -62,15 +56,6 @@ private NetworkSecurityPerimeterConfigurationProperties innerProperties() { return this.innerProperties; } - /** - * 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. * @@ -130,6 +115,21 @@ public NetworkSecurityPerimeter networkSecurityPerimeter() { return this.innerProperties() == null ? null : this.innerProperties().networkSecurityPerimeter(); } + /** + * Set the networkSecurityPerimeter property: The Network Security Perimeter associated with this configuration. + * + * @param networkSecurityPerimeter the networkSecurityPerimeter value to set. + * @return the NetworkSecurityPerimeterConfigurationInner object itself. + */ + public NetworkSecurityPerimeterConfigurationInner + withNetworkSecurityPerimeter(NetworkSecurityPerimeter networkSecurityPerimeter) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); + } + this.innerProperties().withNetworkSecurityPerimeter(networkSecurityPerimeter); + return this; + } + /** * Get the resourceAssociation property: The Resource Association. * @@ -139,6 +139,20 @@ public ResourceAssociation resourceAssociation() { return this.innerProperties() == null ? null : this.innerProperties().resourceAssociation(); } + /** + * Set the resourceAssociation property: The Resource Association. + * + * @param resourceAssociation the resourceAssociation value to set. + * @return the NetworkSecurityPerimeterConfigurationInner object itself. + */ + public NetworkSecurityPerimeterConfigurationInner withResourceAssociation(ResourceAssociation resourceAssociation) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); + } + this.innerProperties().withResourceAssociation(resourceAssociation); + return this; + } + /** * Get the profile property: Network Security Perimeter profile. * @@ -148,6 +162,31 @@ public NetworkSecurityPerimeterProfile profile() { return this.innerProperties() == null ? null : this.innerProperties().profile(); } + /** + * Set the profile property: Network Security Perimeter profile. + * + * @param profile the profile value to set. + * @return the NetworkSecurityPerimeterConfigurationInner object itself. + */ + public NetworkSecurityPerimeterConfigurationInner withProfile(NetworkSecurityPerimeterProfile profile) { + if (this.innerProperties() == null) { + this.innerProperties = new NetworkSecurityPerimeterConfigurationProperties(); + } + this.innerProperties().withProfile(profile); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ @@ -184,8 +223,6 @@ public static NetworkSecurityPerimeterConfigurationInner fromJson(JsonReader jso } else if ("properties".equals(fieldName)) { deserializedNetworkSecurityPerimeterConfigurationInner.innerProperties = NetworkSecurityPerimeterConfigurationProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedNetworkSecurityPerimeterConfigurationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java index 06935d2f6c99..e13764facac8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,7 +19,7 @@ /** * Properties that define a Network Security Perimeter resource. */ -@Immutable +@Fluent public final class NetworkSecurityPerimeterConfigurationProperties implements JsonSerializable { /* @@ -52,7 +52,7 @@ public final class NetworkSecurityPerimeterConfigurationProperties /** * Creates an instance of NetworkSecurityPerimeterConfigurationProperties class. */ - private NetworkSecurityPerimeterConfigurationProperties() { + public NetworkSecurityPerimeterConfigurationProperties() { } /** @@ -84,6 +84,18 @@ public NetworkSecurityPerimeter networkSecurityPerimeter() { return this.networkSecurityPerimeter; } + /** + * Set the networkSecurityPerimeter property: The Network Security Perimeter associated with this configuration. + * + * @param networkSecurityPerimeter the networkSecurityPerimeter value to set. + * @return the NetworkSecurityPerimeterConfigurationProperties object itself. + */ + public NetworkSecurityPerimeterConfigurationProperties + withNetworkSecurityPerimeter(NetworkSecurityPerimeter networkSecurityPerimeter) { + this.networkSecurityPerimeter = networkSecurityPerimeter; + return this; + } + /** * Get the resourceAssociation property: The Resource Association. * @@ -93,6 +105,18 @@ public ResourceAssociation resourceAssociation() { return this.resourceAssociation; } + /** + * Set the resourceAssociation property: The Resource Association. + * + * @param resourceAssociation the resourceAssociation value to set. + * @return the NetworkSecurityPerimeterConfigurationProperties object itself. + */ + public NetworkSecurityPerimeterConfigurationProperties + withResourceAssociation(ResourceAssociation resourceAssociation) { + this.resourceAssociation = resourceAssociation; + return this; + } + /** * Get the profile property: Network Security Perimeter profile. * @@ -102,6 +126,37 @@ public NetworkSecurityPerimeterProfile profile() { return this.profile; } + /** + * Set the profile property: Network Security Perimeter profile. + * + * @param profile the profile value to set. + * @return the NetworkSecurityPerimeterConfigurationProperties object itself. + */ + public NetworkSecurityPerimeterConfigurationProperties withProfile(NetworkSecurityPerimeterProfile profile) { + this.profile = profile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (provisioningIssues() != null) { + provisioningIssues().forEach(e -> e.validate()); + } + if (networkSecurityPerimeter() != null) { + networkSecurityPerimeter().validate(); + } + if (resourceAssociation() != null) { + resourceAssociation().validate(); + } + if (profile() != null) { + profile().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationReconcileResultInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationReconcileResultInner.java index 94435f358385..a04eb979391c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationReconcileResultInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationReconcileResultInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Result of network security perimeter configurations. */ -@Immutable +@Fluent public final class NetworkSecurityPerimeterConfigurationReconcileResultInner implements JsonSerializable { /* @@ -25,7 +25,7 @@ public final class NetworkSecurityPerimeterConfigurationReconcileResultInner /** * Creates an instance of NetworkSecurityPerimeterConfigurationReconcileResultInner class. */ - private NetworkSecurityPerimeterConfigurationReconcileResultInner() { + public NetworkSecurityPerimeterConfigurationReconcileResultInner() { } /** @@ -37,12 +37,32 @@ public String location() { return this.location; } + /** + * Set the location property: The URL of the resource used to check the status of the asynchronous operation. + * + * @param location the location value to set. + * @return the NetworkSecurityPerimeterConfigurationReconcileResultInner object itself. + */ + public NetworkSecurityPerimeterConfigurationReconcileResultInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); return jsonWriter.writeEndObject(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/OperationValueInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/OperationValueInner.java index 3cef21911f8c..93d01cea6c22 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/OperationValueInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/OperationValueInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Describes the properties of a Compute Operation value. */ -@Immutable +@Fluent public final class OperationValueInner implements JsonSerializable { /* * The origin of the compute operation. @@ -40,7 +40,7 @@ public final class OperationValueInner implements JsonSerializable { /* @@ -39,7 +39,7 @@ public final class PrivateLinkScopeValidationDetailsInner /** * Creates an instance of PrivateLinkScopeValidationDetailsInner class. */ - private PrivateLinkScopeValidationDetailsInner() { + public PrivateLinkScopeValidationDetailsInner() { } /** @@ -61,6 +61,18 @@ public PublicNetworkAccessType publicNetworkAccess() { return this.publicNetworkAccess; } + /** + * Set the publicNetworkAccess property: Indicates whether machines associated with the private link scope can also + * use public Azure Arc service endpoints. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the PrivateLinkScopeValidationDetailsInner object itself. + */ + public PrivateLinkScopeValidationDetailsInner withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + /** * Get the connectionDetails property: List of Private Endpoint Connection details. * @@ -70,6 +82,28 @@ public List connectionDetails() { return this.connectionDetails; } + /** + * Set the connectionDetails property: List of Private Endpoint Connection details. + * + * @param connectionDetails the connectionDetails value to set. + * @return the PrivateLinkScopeValidationDetailsInner object itself. + */ + public PrivateLinkScopeValidationDetailsInner withConnectionDetails(List connectionDetails) { + this.connectionDetails = connectionDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (connectionDetails() != null) { + connectionDetails().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProductProfileUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProductProfileUpdateProperties.java index 64ec031457a5..2e7075fac936 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProductProfileUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProductProfileUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -102,6 +102,17 @@ public ProductProfileUpdateProperties withProductFeatures(List e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProvisioningIssueProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProvisioningIssueProperties.java index 1e870215d0d6..1df9478680a2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProvisioningIssueProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProvisioningIssueProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -48,7 +48,7 @@ public final class ProvisioningIssueProperties implements JsonSerializable suggestedAccessRules() { return this.suggestedAccessRules; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (suggestedAccessRules() != null) { + suggestedAccessRules().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsGatewayProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsGatewayProperties.java index bd6132c12aa8..8f3004fbf030 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsGatewayProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsGatewayProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -47,6 +47,14 @@ public SettingsGatewayProperties withGatewayResourceId(String gatewayResourceId) return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsInner.java index ab0dead41428..c49b5590bc49 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -13,7 +13,7 @@ import java.io.IOException; /** - * Concrete proxy resource types can be created by aliasing this type using a specific property type. + * The Settings model. */ @Fluent public final class SettingsInner extends ProxyResource { @@ -128,6 +128,17 @@ public SettingsInner withGatewayResourceId(String gatewayResourceId) { 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/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsProperties.java index 9ade32a8a4f2..9f55875daaeb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -73,6 +73,17 @@ public SettingsProperties withGatewayResourceId(String gatewayResourceId) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerGatewayProperties() != null) { + innerGatewayProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SetupExtensionRequestInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SetupExtensionRequestInner.java index 4afe89e1b4cc..d1009f4e73c9 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SetupExtensionRequestInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SetupExtensionRequestInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.fluent.models; @@ -49,6 +49,17 @@ public SetupExtensionRequestInner withExtensions(List e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/package-info.java index 34fbc5316ff2..ab7dfad9a719 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the inner data models for HybridCompute. - * Azure Arc( Servers and K8s Clusters) API reference for Private Link's Scopes management. + * Package containing the inner data models for HybridComputeManagementClient. + * The Hybrid Compute Management Client. */ package com.azure.resourcemanager.hybridcompute.fluent.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/package-info.java index 761288c75dd5..53a0fc869a14 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the service clients for HybridCompute. - * Azure Arc( Servers and K8s Clusters) API reference for Private Link's Scopes management. + * Package containing the service clients for HybridComputeManagementClient. + * The Hybrid Compute Management Client. */ package com.azure.resourcemanager.hybridcompute.fluent; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sClientImpl.java index 3e1437d51bb4..2c3f8c2ef17a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -25,9 +25,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadataV2sClient; import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueV2Inner; -import com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionValueListResultV2; +import com.azure.resourcemanager.hybridcompute.models.ExtensionValueListResultV2; import reactor.core.publisher.Mono; /** @@ -59,14 +60,14 @@ public final class ExtensionMetadataV2sClientImpl implements ExtensionMetadataV2 * The interface defining all the services for HybridComputeManagementClientExtensionMetadataV2s to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientExtensionMetadataV2s") public interface ExtensionMetadataV2sService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("location") String location, @PathParam("publisher") String publisher, @PathParam("extensionType") String extensionType, @PathParam("version") String version, @HeaderParam("Accept") String accept, Context context); @@ -75,7 +76,7 @@ Mono> get(@HostParam("endpoint") String endpoint @Get("/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("location") String location, @PathParam("publisher") String publisher, @PathParam("extensionType") String extensionType, @PathParam("version") String version, @HeaderParam("Accept") String accept, Context context); @@ -84,7 +85,7 @@ Response getSync(@HostParam("endpoint") String endpoint, @Get("/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("location") String location, @PathParam("publisher") String publisher, @PathParam("extensionType") String extensionType, @HeaderParam("Accept") String accept, Context context); @@ -93,7 +94,7 @@ Mono> list(@HostParam("endpoint") String en @Get("/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("location") String location, @PathParam("publisher") String publisher, @PathParam("extensionType") String extensionType, @HeaderParam("Accept") String accept, Context context); @@ -103,7 +104,7 @@ Response listSync(@HostParam("endpoint") String endp @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -111,14 +112,14 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets an Extension Metadata based on location, publisher, extensionType and version. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param version The version of the Extension being received. @@ -131,6 +132,22 @@ Response listNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String location, String publisher, String extensionType, String version) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + return Mono.error(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionType is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), location, @@ -141,7 +158,7 @@ private Mono> getWithResponseAsync(String locati /** * Gets an Extension Metadata based on location, publisher, extensionType and version. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param version The version of the Extension being received. @@ -161,7 +178,7 @@ private Mono getAsync(String location, String publisher, /** * Gets an Extension Metadata based on location, publisher, extensionType and version. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param version The version of the Extension being received. @@ -175,6 +192,27 @@ private Mono getAsync(String location, String publisher, @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String location, String publisher, String extensionType, String version, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionType is required and cannot be null.")); + } + if (version == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), location, publisher, extensionType, version, accept, context); @@ -183,7 +221,7 @@ public Response getWithResponse(String location, String p /** * Gets an Extension Metadata based on location, publisher, extensionType and version. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param version The version of the Extension being received. @@ -200,7 +238,7 @@ public ExtensionValueV2Inner get(String location, String publisher, String exten /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -212,6 +250,19 @@ public ExtensionValueV2Inner get(String location, String publisher, String exten @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location, String publisher, String extensionType) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + return Mono.error(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionType is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), location, @@ -224,7 +275,7 @@ private Mono> listSinglePageAsync(String lo /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -242,7 +293,7 @@ private PagedFlux listAsync(String location, String publi /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -253,6 +304,23 @@ private PagedFlux listAsync(String location, String publi @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String location, String publisher, String extensionType) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionType is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), location, publisher, extensionType, accept, Context.NONE); @@ -263,7 +331,7 @@ private PagedResponse listSinglePage(String location, Str /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param context The context to associate with this operation. @@ -275,6 +343,23 @@ private PagedResponse listSinglePage(String location, Str @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String location, String publisher, String extensionType, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionType is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), location, publisher, extensionType, accept, context); @@ -285,7 +370,7 @@ private PagedResponse listSinglePage(String location, Str /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -303,7 +388,7 @@ public PagedIterable list(String location, String publish /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param context The context to associate with this operation. @@ -327,11 +412,18 @@ public PagedIterable list(String location, String publish * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the List Extension Metadata response 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(), @@ -346,10 +438,19 @@ private Mono> listNextSinglePageAsync(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 all Extension versions based on location, publisher, extensionType along with {@link PagedResponse}. + * @return the List Extension Metadata response 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); @@ -365,14 +466,25 @@ 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 all Extension versions based on location, publisher, extensionType along with {@link PagedResponse}. + * @return the List Extension Metadata response 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(ExtensionMetadataV2sClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sImpl.java index 3a01065ad512..cd18378c9e20 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -31,8 +31,12 @@ public Response getWithResponse(String location, String publis String version, Context context) { Response inner = this.serviceClient().getWithResponse(location, publisher, extensionType, version, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ExtensionValueV2Impl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExtensionValueV2Impl(inner.getValue(), this.manager())); + } else { + return null; + } } public ExtensionValueV2 get(String location, String publisher, String extensionType, String version) { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasClientImpl.java index a57f9e6561e1..29555b3d9751 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -25,9 +25,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadatasClient; import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionValueListResult; +import com.azure.resourcemanager.hybridcompute.models.ExtensionValueListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +60,14 @@ public final class ExtensionMetadatasClientImpl implements ExtensionMetadatasCli * The interface defining all the services for HybridComputeManagementClientExtensionMetadatas to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientExtensionMetadatas") public interface ExtensionMetadatasService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("publisher") String publisher, @PathParam("extensionType") String extensionType, @PathParam("version") String version, @@ -76,7 +77,7 @@ Mono> get(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("publisher") String publisher, @PathParam("extensionType") String extensionType, @PathParam("version") String version, @@ -86,7 +87,7 @@ Response getSync(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("publisher") String publisher, @PathParam("extensionType") String extensionType, @HeaderParam("Accept") String accept, Context context); @@ -95,25 +96,10 @@ Mono> list(@HostParam("endpoint") String endp @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, @PathParam("publisher") String publisher, @PathParam("extensionType") String extensionType, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -132,6 +118,26 @@ Response listNextSync(@PathParam(value = "nextLink", e @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String location, String publisher, String extensionType, String version) { + 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + return Mono.error(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionType is required and cannot be null.")); + } + if (version == null) { + return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -176,6 +182,32 @@ private Mono getAsync(String location, String publisher, St @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String location, String publisher, String extensionType, String version, 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 (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionType is required and cannot be null.")); + } + if (version == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter version is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, publisher, extensionType, version, accept, context); @@ -213,12 +245,29 @@ public ExtensionValueInner get(String location, String publisher, String extensi @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location, String publisher, String extensionType) { + 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + return Mono.error(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionType 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(), location, publisher, extensionType, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -236,8 +285,7 @@ private Mono> listSinglePageAsync(String loca */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location, String publisher, String extensionType) { - return new PagedFlux<>(() -> listSinglePageAsync(location, publisher, extensionType), - nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(location, publisher, extensionType)); } /** @@ -253,12 +301,34 @@ private PagedFlux listAsync(String location, String publish */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String location, String publisher, String extensionType) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionType is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, publisher, extensionType, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + null, null); } /** @@ -276,12 +346,34 @@ private PagedResponse listSinglePage(String location, Strin @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String location, String publisher, String extensionType, 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 (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } + if (extensionType == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionType is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, publisher, extensionType, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + null, null); } /** @@ -298,8 +390,7 @@ private PagedResponse listSinglePage(String location, Strin */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, String publisher, String extensionType) { - return new PagedIterable<>(() -> listSinglePage(location, publisher, extensionType), - nextLink -> listNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage(location, publisher, extensionType)); } /** @@ -318,63 +409,8 @@ public PagedIterable list(String location, String publisher @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, String publisher, String extensionType, Context context) { - return new PagedIterable<>(() -> listSinglePage(location, publisher, extensionType, context), - nextLink -> listNextSinglePage(nextLink, context)); + return new PagedIterable<>(() -> listSinglePage(location, publisher, extensionType, 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 all Extension versions based on location, publisher, extensionType along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } + private static final ClientLogger LOGGER = new ClientLogger(ExtensionMetadatasClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasImpl.java index 38911baaad18..1905e07ebe16 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -31,8 +31,12 @@ public Response getWithResponse(String location, String publishe String version, Context context) { Response inner = this.serviceClient().getWithResponse(location, publisher, extensionType, version, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ExtensionValueImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ExtensionValueImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public ExtensionValue get(String location, String publisher, String extensionType, String version) { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublisherImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublisherImpl.java index 5bf446eec4ee..90478e4f11f3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublisherImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublisherImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersClientImpl.java index be8389dadc51..bc5d46923342 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -25,9 +25,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridcompute.fluent.ExtensionPublishersClient; import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionPublisherInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionPublisherListResult; +import com.azure.resourcemanager.hybridcompute.models.ExtensionPublisherListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +60,14 @@ public final class ExtensionPublishersClientImpl implements ExtensionPublishersC * The interface defining all the services for HybridComputeManagementClientExtensionPublishers to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientExtensionPublishers") public interface ExtensionPublishersService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.HybridCompute/locations/{location}/publishers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @@ -74,7 +75,7 @@ Mono> list(@HostParam("endpoint") String @Get("/providers/Microsoft.HybridCompute/locations/{location}/publishers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("location") String location, @HeaderParam("Accept") String accept, Context context); @@ -83,7 +84,7 @@ Response listSync(@HostParam("endpoint") String en @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -91,14 +92,14 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -107,6 +108,13 @@ Response listNextSync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil.withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), location, accept, context)) @@ -118,7 +126,7 @@ private Mono> listSinglePageAsync(String /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -132,7 +140,7 @@ private PagedFlux listAsync(String location) { /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -140,6 +148,15 @@ private PagedFlux listAsync(String location) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String location) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), location, accept, Context.NONE); @@ -150,7 +167,7 @@ private PagedResponse listSinglePage(String location) { /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -159,6 +176,15 @@ private PagedResponse listSinglePage(String location) { */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String location, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), location, accept, context); @@ -169,7 +195,7 @@ private PagedResponse listSinglePage(String location, C /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -183,7 +209,7 @@ public PagedIterable list(String location) { /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -203,11 +229,18 @@ public PagedIterable list(String location, Context cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension publishers based on the location along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * @return the List of Extension Publishers 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(), @@ -222,10 +255,19 @@ private Mono> listNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension publishers based on the location along with {@link PagedResponse}. + * @return the List of Extension Publishers 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); @@ -241,14 +283,25 @@ private PagedResponse listNextSinglePage(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 all Extension publishers based on the location along with {@link PagedResponse}. + * @return the List of Extension Publishers 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(ExtensionPublishersClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersImpl.java index ca96ec610054..21509b8c19f0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypeImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypeImpl.java index f7dc11fdcfcd..fa82509706ec 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypeImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypeImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesClientImpl.java index 1fd01c6be88c..f8f7be66a642 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -25,9 +25,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridcompute.fluent.ExtensionTypesClient; import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionTypeInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionTypeListResult; +import com.azure.resourcemanager.hybridcompute.models.ExtensionTypeListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +60,14 @@ public final class ExtensionTypesClientImpl implements ExtensionTypesClient { * The interface defining all the services for HybridComputeManagementClientExtensionTypes to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientExtensionTypes") public interface ExtensionTypesService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("location") String location, @PathParam("publisher") String publisher, @HeaderParam("Accept") String accept, Context context); @@ -74,7 +75,7 @@ Mono> list(@HostParam("endpoint") String endpo @Get("/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("location") String location, @PathParam("publisher") String publisher, @HeaderParam("Accept") String accept, Context context); @@ -83,20 +84,20 @@ Response listSync(@HostParam("endpoint") String endpoin @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -106,6 +107,16 @@ Response listNextSync(@PathParam(value = "nextLink", en */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location, String publisher) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + return Mono.error(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), location, @@ -118,7 +129,7 @@ private Mono> listSinglePageAsync(String locat /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -134,7 +145,7 @@ private PagedFlux listAsync(String location, String publishe /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -143,6 +154,19 @@ private PagedFlux listAsync(String location, String publishe */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String location, String publisher) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), location, publisher, accept, Context.NONE); @@ -153,7 +177,7 @@ private PagedResponse listSinglePage(String location, String /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -163,6 +187,19 @@ private PagedResponse listSinglePage(String location, String */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String location, String publisher, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (publisher == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter publisher is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), location, publisher, accept, context); @@ -173,7 +210,7 @@ private PagedResponse listSinglePage(String location, String /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -188,7 +225,7 @@ public PagedIterable list(String location, String publisher) /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -209,11 +246,17 @@ public PagedIterable list(String location, String publisher, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension types based on location and publisher along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the List of Extension Types 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(), @@ -228,10 +271,19 @@ private Mono> listNextSinglePageAsync(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 all Extension types based on location and publisher along with {@link PagedResponse}. + * @return the List of Extension Types 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); @@ -247,14 +299,25 @@ 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 all Extension types based on location and publisher along with {@link PagedResponse}. + * @return the List of Extension Types 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(ExtensionTypesClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesImpl.java index 9f2f655a683e..b622fa2b9b28 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueImpl.java index 5e6f39fcb772..05ff636d3908 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueV2Impl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueV2Impl.java index 1b678627a79e..7b37ce7c14a9 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueV2Impl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueV2Impl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewayImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewayImpl.java index 7bb619ae6e4d..94112d1970f0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewayImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewayImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysClientImpl.java index e6d05cd1d957..ed9553f82647 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -31,12 +31,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.hybridcompute.fluent.GatewaysClient; import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.GatewaysListResult; import com.azure.resourcemanager.hybridcompute.models.GatewayUpdate; +import com.azure.resourcemanager.hybridcompute.models.GatewaysListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,104 +70,106 @@ public final class GatewaysClientImpl implements GatewaysClient { * The interface defining all the services for HybridComputeManagementClientGateways to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientGateways") public interface GatewaysService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") GatewayInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") GatewayInner parameters, @HeaderParam("Accept") String accept, + Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") GatewayInner parameters, Context context); + @BodyParam("application/json") GatewayUpdate parameters, @HeaderParam("Accept") String accept, + Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") GatewayInner parameters, Context context); + @BodyParam("application/json") GatewayUpdate parameters, @HeaderParam("Accept") String accept, + Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") GatewayUpdate parameters, Context context); + @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, + Response getByResourceGroupSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") GatewayUpdate parameters, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, + Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -174,7 +177,7 @@ Mono> list(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/gateways") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -183,7 +186,7 @@ Response listSync(@HostParam("endpoint") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -191,7 +194,7 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -199,7 +202,7 @@ Response listByResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -207,80 +210,10 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Retrieves information about the view of a gateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the Gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes an Arc Gateway along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String gatewayName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, gatewayName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves information about the view of a gateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the Gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes an Arc Gateway on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String gatewayName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, gatewayName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves information about the view of a gateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the Gateway. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes an Arc Gateway along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String gatewayName, - Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, gatewayName, accept, context); - } - - /** - * Retrieves information about the view of a gateway. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param gatewayName The name of the Gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes an Arc Gateway. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public GatewayInner getByResourceGroup(String resourceGroupName, String gatewayName) { - return getByResourceGroupWithResponse(resourceGroupName, gatewayName, Context.NONE).getValue(); - } - /** * The operation to create or update a gateway. * @@ -295,12 +228,30 @@ public GatewayInner getByResourceGroup(String resourceGroupName, String gatewayN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String gatewayName, GatewayInner parameters) { - final String contentType = "application/json"; + 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 (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, gatewayName, contentType, accept, parameters, - context)) + this.client.getSubscriptionId(), resourceGroupName, gatewayName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -318,11 +269,33 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String gatewayName, GatewayInner parameters) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (gatewayName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, gatewayName, contentType, accept, parameters, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, gatewayName, parameters, accept, Context.NONE); } /** @@ -340,10 +313,33 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String gatewayName, GatewayInner parameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (gatewayName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, gatewayName, contentType, accept, parameters, context); + this.client.getSubscriptionId(), resourceGroupName, gatewayName, parameters, accept, context); } /** @@ -471,10 +467,30 @@ public GatewayInner createOrUpdate(String resourceGroupName, String gatewayName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, String gatewayName, GatewayUpdate parameters) { - final String contentType = "application/json"; + 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 (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, gatewayName, contentType, accept, parameters, context)) + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, gatewayName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -510,10 +526,33 @@ private Mono updateAsync(String resourceGroupName, String gatewayN @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String gatewayName, GatewayUpdate parameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (gatewayName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, gatewayName, contentType, accept, parameters, context); + this.client.getSubscriptionId(), resourceGroupName, gatewayName, parameters, accept, context); } /** @@ -532,6 +571,109 @@ public GatewayInner update(String resourceGroupName, String gatewayName, Gateway return updateWithResponse(resourceGroupName, gatewayName, parameters, Context.NONE).getValue(); } + /** + * Retrieves information about the view of a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes an Arc Gateway along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String gatewayName) { + 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 (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName 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, gatewayName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves information about the view of a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes an Arc Gateway on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String gatewayName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, gatewayName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves information about the view of a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes an Arc Gateway along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String gatewayName, + 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 (gatewayName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, gatewayName, accept, context); + } + + /** + * Retrieves information about the view of a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GatewayInner getByResourceGroup(String resourceGroupName, String gatewayName) { + return getByResourceGroupWithResponse(resourceGroupName, gatewayName, Context.NONE).getValue(); + } + /** * The operation to delete a gateway. * @@ -544,9 +686,25 @@ public GatewayInner update(String resourceGroupName, String gatewayName, Gateway */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String gatewayName) { + 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 (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName 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, gatewayName, context)) + this.client.getSubscriptionId(), resourceGroupName, gatewayName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -562,8 +720,27 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String gatewayName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (gatewayName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, gatewayName, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, gatewayName, accept, Context.NONE); } /** @@ -579,8 +756,27 @@ private Response deleteWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String gatewayName, 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 (gatewayName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, gatewayName, context); + this.client.getSubscriptionId(), resourceGroupName, gatewayName, accept, context); } /** @@ -685,15 +881,27 @@ public void delete(String resourceGroupName, String gatewayName, Context context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items along with {@link PagedResponse} on successful completion of + * @return the List license operation response along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (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.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -706,7 +914,7 @@ private Mono> listByResourceGroupSinglePageAsync(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 paged collection of Gateway items as paginated response with {@link PagedFlux}. + * @return the List license operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -721,13 +929,27 @@ private PagedFlux listByResourceGroupAsync(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 paged collection of Gateway items along with {@link PagedResponse}. + * @return the List license operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -740,13 +962,27 @@ private PagedResponse listByResourceGroupSinglePage(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 paged collection of Gateway items along with {@link PagedResponse}. + * @return the List license operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -758,7 +994,7 @@ private PagedResponse listByResourceGroupSinglePage(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 paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -774,7 +1010,7 @@ public PagedIterable listByResourceGroup(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 paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -787,11 +1023,19 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items along with {@link PagedResponse} on successful completion of + * @return the List license operation response 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.")); + } + 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(), @@ -806,7 +1050,7 @@ private Mono> listSinglePageAsync() { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedFlux}. + * @return the List license operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -819,10 +1063,20 @@ private PagedFlux listAsync() { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } + 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); @@ -837,10 +1091,20 @@ private PagedResponse listSinglePage() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } + 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); @@ -853,7 +1117,7 @@ private PagedResponse listSinglePage(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -867,7 +1131,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -882,11 +1146,18 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items along with {@link PagedResponse} on successful completion of + * @return the List license operation response 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.")); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -903,10 +1174,19 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items along with {@link PagedResponse}. + * @return the List license operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -922,10 +1202,19 @@ 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 paged collection of Gateway items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -940,11 +1229,18 @@ 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 paged collection of Gateway items along with {@link PagedResponse} on successful completion of + * @return the List license operation response 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.")); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -961,10 +1257,19 @@ private Mono> listBySubscriptionNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -980,14 +1285,25 @@ 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 paged collection of Gateway items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } 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(GatewaysClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysImpl.java index ed80dc7d5bfa..ed0576daa4d6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -31,8 +31,12 @@ public Response getByResourceGroupWithResponse(String resourceGroupName Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, gatewayName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new GatewayImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new GatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public Gateway getByResourceGroup(String resourceGroupName, String gatewayName) { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientBuilder.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientBuilder.java index 170ce6807cb1..77122d13605b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientBuilder.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -20,34 +20,34 @@ @ServiceClientBuilder(serviceClients = { HybridComputeManagementClientImpl.class }) public final class HybridComputeManagementClientBuilder { /* - * Service host + * The ID of the target subscription. */ - private String endpoint; + private String subscriptionId; /** - * Sets Service host. + * Sets The ID of the target subscription. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the HybridComputeManagementClientBuilder. */ - public HybridComputeManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public HybridComputeManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } /* - * The ID of the target subscription. The value must be an UUID. + * server parameter */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. The value must be an UUID. + * Sets server parameter. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the HybridComputeManagementClientBuilder. */ - public HybridComputeManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public HybridComputeManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } @@ -132,7 +132,7 @@ public HybridComputeManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); HybridComputeManagementClientImpl client = new HybridComputeManagementClientImpl(localPipeline, - localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientImpl.java index 118f97a670bc..fa1e11929fd8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -60,45 +60,45 @@ @ServiceClient(builder = HybridComputeManagementClientBuilder.class) public final class HybridComputeManagementClientImpl implements HybridComputeManagementClient { /** - * Service host. + * The ID of the target subscription. */ - private final String endpoint; + private final String subscriptionId; /** - * Gets Service host. + * Gets The ID of the target subscription. * - * @return the endpoint value. + * @return the subscriptionId value. */ - public String getEndpoint() { - return this.endpoint; + public String getSubscriptionId() { + return this.subscriptionId; } /** - * Version parameter. + * server parameter. */ - private final String apiVersion; + private final String endpoint; /** - * Gets Version parameter. + * Gets server parameter. * - * @return the apiVersion value. + * @return the endpoint value. */ - public String getApiVersion() { - return this.apiVersion; + public String getEndpoint() { + return this.endpoint; } /** - * The ID of the target subscription. The value must be an UUID. + * Api Version. */ - private final String subscriptionId; + private final String apiVersion; /** - * Gets The ID of the target subscription. The value must be an UUID. + * Gets Api Version. * - * @return the subscriptionId value. + * @return the apiVersion value. */ - public String getSubscriptionId() { - return this.subscriptionId; + public String getApiVersion() { + return this.apiVersion; } /** @@ -143,34 +143,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** - * The ResourceProvidersClient object to access its operations. - */ - private final ResourceProvidersClient resourceProviders; - - /** - * Gets the ResourceProvidersClient object to access its operations. - * - * @return the ResourceProvidersClient object. - */ - public ResourceProvidersClient getResourceProviders() { - return this.resourceProviders; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - /** * The LicensesClient object to access its operations. */ @@ -228,129 +200,129 @@ public MachineExtensionsClient getMachineExtensions() { } /** - * The MachineRunCommandsClient object to access its operations. + * The ResourceProvidersClient object to access its operations. */ - private final MachineRunCommandsClient machineRunCommands; + private final ResourceProvidersClient resourceProviders; /** - * Gets the MachineRunCommandsClient object to access its operations. + * Gets the ResourceProvidersClient object to access its operations. * - * @return the MachineRunCommandsClient object. + * @return the ResourceProvidersClient object. */ - public MachineRunCommandsClient getMachineRunCommands() { - return this.machineRunCommands; + public ResourceProvidersClient getResourceProviders() { + return this.resourceProviders; } /** - * The GatewaysClient object to access its operations. + * The ExtensionMetadatasClient object to access its operations. */ - private final GatewaysClient gateways; + private final ExtensionMetadatasClient extensionMetadatas; /** - * Gets the GatewaysClient object to access its operations. + * Gets the ExtensionMetadatasClient object to access its operations. * - * @return the GatewaysClient object. + * @return the ExtensionMetadatasClient object. */ - public GatewaysClient getGateways() { - return this.gateways; + public ExtensionMetadatasClient getExtensionMetadatas() { + return this.extensionMetadatas; } /** - * The PrivateLinkResourcesClient object to access its operations. + * The ExtensionMetadataV2sClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; + private final ExtensionMetadataV2sClient extensionMetadataV2s; /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the ExtensionMetadataV2sClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the ExtensionMetadataV2sClient object. */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; + public ExtensionMetadataV2sClient getExtensionMetadataV2s() { + return this.extensionMetadataV2s; } /** - * The PrivateEndpointConnectionsClient object to access its operations. + * The ExtensionTypesClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; + private final ExtensionTypesClient extensionTypes; /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the ExtensionTypesClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the ExtensionTypesClient object. */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; + public ExtensionTypesClient getExtensionTypes() { + return this.extensionTypes; } /** - * The NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * The ExtensionPublishersClient object to access its operations. */ - private final NetworkSecurityPerimeterConfigurationsClient networkSecurityPerimeterConfigurations; + private final ExtensionPublishersClient extensionPublishers; /** - * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * Gets the ExtensionPublishersClient object to access its operations. * - * @return the NetworkSecurityPerimeterConfigurationsClient object. + * @return the ExtensionPublishersClient object. */ - public NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations() { - return this.networkSecurityPerimeterConfigurations; + public ExtensionPublishersClient getExtensionPublishers() { + return this.extensionPublishers; } /** - * The NetworkProfilesClient object to access its operations. + * The OperationsClient object to access its operations. */ - private final NetworkProfilesClient networkProfiles; + private final OperationsClient operations; /** - * Gets the NetworkProfilesClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the NetworkProfilesClient object. + * @return the OperationsClient object. */ - public NetworkProfilesClient getNetworkProfiles() { - return this.networkProfiles; + public OperationsClient getOperations() { + return this.operations; } /** - * The PrivateLinkScopesClient object to access its operations. + * The NetworkProfilesClient object to access its operations. */ - private final PrivateLinkScopesClient privateLinkScopes; + private final NetworkProfilesClient networkProfiles; /** - * Gets the PrivateLinkScopesClient object to access its operations. + * Gets the NetworkProfilesClient object to access its operations. * - * @return the PrivateLinkScopesClient object. + * @return the NetworkProfilesClient object. */ - public PrivateLinkScopesClient getPrivateLinkScopes() { - return this.privateLinkScopes; + public NetworkProfilesClient getNetworkProfiles() { + return this.networkProfiles; } /** - * The ExtensionMetadatasClient object to access its operations. + * The MachineRunCommandsClient object to access its operations. */ - private final ExtensionMetadatasClient extensionMetadatas; + private final MachineRunCommandsClient machineRunCommands; /** - * Gets the ExtensionMetadatasClient object to access its operations. + * Gets the MachineRunCommandsClient object to access its operations. * - * @return the ExtensionMetadatasClient object. + * @return the MachineRunCommandsClient object. */ - public ExtensionMetadatasClient getExtensionMetadatas() { - return this.extensionMetadatas; + public MachineRunCommandsClient getMachineRunCommands() { + return this.machineRunCommands; } /** - * The ExtensionMetadataV2sClient object to access its operations. + * The GatewaysClient object to access its operations. */ - private final ExtensionMetadataV2sClient extensionMetadataV2s; + private final GatewaysClient gateways; /** - * Gets the ExtensionMetadataV2sClient object to access its operations. + * Gets the GatewaysClient object to access its operations. * - * @return the ExtensionMetadataV2sClient object. + * @return the GatewaysClient object. */ - public ExtensionMetadataV2sClient getExtensionMetadataV2s() { - return this.extensionMetadataV2s; + public GatewaysClient getGateways() { + return this.gateways; } /** @@ -368,31 +340,59 @@ public SettingsOperationsClient getSettingsOperations() { } /** - * The ExtensionTypesClient object to access its operations. + * The PrivateLinkScopesClient object to access its operations. */ - private final ExtensionTypesClient extensionTypes; + private final PrivateLinkScopesClient privateLinkScopes; /** - * Gets the ExtensionTypesClient object to access its operations. + * Gets the PrivateLinkScopesClient object to access its operations. * - * @return the ExtensionTypesClient object. + * @return the PrivateLinkScopesClient object. */ - public ExtensionTypesClient getExtensionTypes() { - return this.extensionTypes; + public PrivateLinkScopesClient getPrivateLinkScopes() { + return this.privateLinkScopes; } /** - * The ExtensionPublishersClient object to access its operations. + * The PrivateLinkResourcesClient object to access its operations. */ - private final ExtensionPublishersClient extensionPublishers; + private final PrivateLinkResourcesClient privateLinkResources; /** - * Gets the ExtensionPublishersClient object to access its operations. + * Gets the PrivateLinkResourcesClient object to access its operations. * - * @return the ExtensionPublishersClient object. + * @return the PrivateLinkResourcesClient object. */ - public ExtensionPublishersClient getExtensionPublishers() { - return this.extensionPublishers; + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; + } + + /** + * The PrivateEndpointConnectionsClient object to access its operations. + */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * The NetworkSecurityPerimeterConfigurationsClient object to access its operations. + */ + private final NetworkSecurityPerimeterConfigurationsClient networkSecurityPerimeterConfigurations; + + /** + * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * + * @return the NetworkSecurityPerimeterConfigurationsClient object. + */ + public NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations() { + return this.networkSecurityPerimeterConfigurations; } /** @@ -402,35 +402,35 @@ public ExtensionPublishersClient getExtensionPublishers() { * @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 subscriptionId The ID of the target subscription. + * @param endpoint server parameter. */ HybridComputeManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2025-09-16-preview"; - this.resourceProviders = new ResourceProvidersClientImpl(this); - this.operations = new OperationsClientImpl(this); + this.endpoint = endpoint; + this.apiVersion = "2025-02-19-preview"; this.licenses = new LicensesClientImpl(this); this.machines = new MachinesClientImpl(this); this.licenseProfiles = new LicenseProfilesClientImpl(this); this.machineExtensions = new MachineExtensionsClientImpl(this); + this.resourceProviders = new ResourceProvidersClientImpl(this); + this.extensionMetadatas = new ExtensionMetadatasClientImpl(this); + this.extensionMetadataV2s = new ExtensionMetadataV2sClientImpl(this); + this.extensionTypes = new ExtensionTypesClientImpl(this); + this.extensionPublishers = new ExtensionPublishersClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.networkProfiles = new NetworkProfilesClientImpl(this); this.machineRunCommands = new MachineRunCommandsClientImpl(this); this.gateways = new GatewaysClientImpl(this); + this.settingsOperations = new SettingsOperationsClientImpl(this); + this.privateLinkScopes = new PrivateLinkScopesClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsClientImpl(this); - this.networkProfiles = new NetworkProfilesClientImpl(this); - this.privateLinkScopes = new PrivateLinkScopesClientImpl(this); - this.extensionMetadatas = new ExtensionMetadatasClientImpl(this); - this.extensionMetadataV2s = new ExtensionMetadataV2sClientImpl(this); - this.settingsOperations = new SettingsOperationsClientImpl(this); - this.extensionTypes = new ExtensionTypesClientImpl(this); - this.extensionPublishers = new ExtensionPublishersClientImpl(this); } /** @@ -544,7 +544,7 @@ private static final class HttpResponseImpl extends HttpResponse { super(null); this.statusCode = statusCode; this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? new byte[0] : responseBody.getBytes(StandardCharsets.UTF_8); + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); } public int getStatusCode() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputePrivateLinkScopeImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputePrivateLinkScopeImpl.java index db93b4f5acaf..d9757cfa44d3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputePrivateLinkScopeImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputePrivateLinkScopeImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseImpl.java index c7991aa4a53e..abc01a285035 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileImpl.java index 4c7bbc26c995..732e5f079b60 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewEsuPropertiesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewEsuPropertiesImpl.java index 257aabc2fd6f..29edb345c43a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewEsuPropertiesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewEsuPropertiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewImpl.java index 5e5447d907d6..faf056aaddbb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesClientImpl.java index 8cae85924421..68e98f156e4e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -31,12 +31,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.hybridcompute.fluent.LicenseProfilesClient; import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.LicenseProfilesListResult; import com.azure.resourcemanager.hybridcompute.models.LicenseProfileUpdate; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfilesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,103 +71,109 @@ public final class LicenseProfilesClientImpl implements LicenseProfilesClient { * The interface defining all the services for HybridComputeManagementClientLicenseProfiles to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientLicenseProfiles") public interface LicenseProfilesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Accept") String accept, + @PathParam("licenseProfileName") String licenseProfileName, + @BodyParam("application/json") LicenseProfileInner parameters, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @ExpectedResponses({ 200 }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Accept") String accept, + @PathParam("licenseProfileName") String licenseProfileName, + @BodyParam("application/json") LicenseProfileInner parameters, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") LicenseProfileInner parameters, + @PathParam("licenseProfileName") String licenseProfileName, + @BodyParam("application/json") LicenseProfileUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @ExpectedResponses({ 200, 201 }) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") LicenseProfileInner parameters, + @PathParam("licenseProfileName") String licenseProfileName, + @BodyParam("application/json") LicenseProfileUpdate parameters, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") LicenseProfileUpdate parameters, + @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @ExpectedResponses({ 200, 202 }) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") LicenseProfileUpdate parameters, + @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, Context context); + @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Accept") String accept, + Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, + Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, Context context); + @PathParam("licenseProfileName") String licenseProfileName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -174,7 +181,7 @@ Response listSync(@HostParam("endpoint") String endpo @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -182,78 +189,7 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String machineName) { - final String licenseProfileName = "default"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String machineName) { - return getWithResponseAsync(resourceGroupName, machineName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String machineName, - Context context) { - final String licenseProfileName = "default"; - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, machineName, licenseProfileName, accept, context); - } - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseProfileInner get(String resourceGroupName, String machineName) { - return getWithResponse(resourceGroupName, machineName, Context.NONE).getValue(); + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -271,13 +207,32 @@ public LicenseProfileInner get(String resourceGroupName, String machineName) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String machineName, LicenseProfileInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String licenseProfileName = "default"; - 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, machineName, licenseProfileName, contentType, - accept, parameters, context)) + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -295,12 +250,35 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String machineName, LicenseProfileInner parameters) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String licenseProfileName = "default"; - final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, contentType, accept, - parameters, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, parameters, accept, + Context.NONE); } /** @@ -318,12 +296,35 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String machineName, LicenseProfileInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String licenseProfileName = "default"; - final String contentType = "application/json"; final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, contentType, accept, - parameters, context); + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, parameters, accept, + context); } /** @@ -453,13 +454,32 @@ public LicenseProfileInner createOrUpdate(String resourceGroupName, String machi @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String machineName, LicenseProfileUpdate parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String licenseProfileName = "default"; - final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, contentType, - accept, parameters, context)) + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, parameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -477,12 +497,35 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String machineName, LicenseProfileUpdate parameters) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String licenseProfileName = "default"; - final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, contentType, accept, - parameters, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, parameters, accept, + Context.NONE); } /** @@ -500,12 +543,35 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String machineName, LicenseProfileUpdate parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String licenseProfileName = "default"; - final String contentType = "application/json"; final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, contentType, accept, - parameters, context); + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, parameters, accept, + context); } /** @@ -618,6 +684,110 @@ public LicenseProfileInner update(String resourceGroupName, String machineName, return beginUpdate(resourceGroupName, machineName, parameters, context).getFinalResult(); } + /** + * Retrieves information about the view of a license profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String machineName) { + 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 (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + final String licenseProfileName = "default"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves information about the view of a license profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String machineName) { + return getWithResponseAsync(resourceGroupName, machineName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves information about the view of a license profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String machineName, + 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + final String licenseProfileName = "default"; + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, machineName, licenseProfileName, accept, context); + } + + /** + * Retrieves information about the view of a license profile. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid 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 describes a license profile in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicenseProfileInner get(String resourceGroupName, String machineName) { + return getWithResponse(resourceGroupName, machineName, Context.NONE).getValue(); + } + /** * The operation to delete a license profile. * @@ -630,10 +800,26 @@ public LicenseProfileInner update(String resourceGroupName, String machineName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String machineName) { + 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 (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } final String licenseProfileName = "default"; + final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, context)) + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -649,9 +835,28 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String machineName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } final String licenseProfileName = "default"; + final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, accept, Context.NONE); } /** @@ -667,9 +872,28 @@ private Response deleteWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String machineName, 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } final String licenseProfileName = "default"; + final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, context); + this.client.getSubscriptionId(), resourceGroupName, machineName, licenseProfileName, accept, context); } /** @@ -771,19 +995,34 @@ public void delete(String resourceGroupName, String machineName, Context context * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the List hybrid machine license profile operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String machineName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName 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(), resourceGroupName, machineName, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, machineName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -793,11 +1032,11 @@ private Mono> listSinglePageAsync(String reso * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items as paginated response with {@link PagedFlux}. + * @return the List hybrid machine license profile operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String machineName) { @@ -809,18 +1048,35 @@ private PagedFlux listAsync(String resourceGroupName, Strin * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items along with {@link PagedResponse}. + * @return the List hybrid machine license profile operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String machineName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and 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(), - resourceGroupName, machineName, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), resourceGroupName, + machineName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -829,20 +1085,37 @@ private PagedResponse listSinglePage(String resourceGroupNa * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items along with {@link PagedResponse}. + * @return the List hybrid machine license profile operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String machineName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and 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(), - resourceGroupName, machineName, accept, context); + Response res = service.listSync(this.client.getEndpoint(), resourceGroupName, + machineName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -851,11 +1124,12 @@ private PagedResponse listSinglePage(String resourceGroupNa * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items as paginated response with {@link PagedIterable}. + * @return the List hybrid machine license profile operation response as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String machineName) { @@ -867,12 +1141,13 @@ public PagedIterable list(String resourceGroupName, String * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items as paginated response with {@link PagedIterable}. + * @return the List hybrid machine license profile operation response as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String machineName, Context context) { @@ -887,11 +1162,18 @@ public PagedIterable list(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 paged collection of LicenseProfile items along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the List hybrid machine license profile operation response 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(), @@ -906,10 +1188,19 @@ private Mono> listNextSinglePageAsync(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 paged collection of LicenseProfile items along with {@link PagedResponse}. + * @return the List hybrid machine license profile operation response 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); @@ -925,14 +1216,25 @@ 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 paged collection of LicenseProfile items along with {@link PagedResponse}. + * @return the List hybrid machine license profile operation response 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(LicenseProfilesClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesImpl.java index 72314cff1704..e08e89e4a902 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -30,8 +30,12 @@ public LicenseProfilesImpl(LicenseProfilesClient innerClient, public Response getWithResponse(String resourceGroupName, String machineName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, machineName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LicenseProfileImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LicenseProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public LicenseProfile get(String resourceGroupName, String machineName) { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesClientImpl.java index a85d09eac954..01181531ca2c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -32,12 +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.hybridcompute.fluent.LicensesClient; import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.LicensesListResult; import com.azure.resourcemanager.hybridcompute.models.LicenseUpdate; +import com.azure.resourcemanager.hybridcompute.models.LicensesListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,104 +71,124 @@ public final class LicensesClientImpl implements LicensesClient { * The interface defining all the services for HybridComputeManagementClientLicenses to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientLicenses") public interface LicensesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + Mono>> validateLicense(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") LicenseInner parameters, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + Response validateLicenseSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, - @HeaderParam("Accept") String accept, Context context); + @BodyParam("application/json") LicenseInner parameters, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") LicenseInner parameters, Context context); + @BodyParam("application/json") LicenseInner parameters, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") LicenseInner parameters, Context context); + @BodyParam("application/json") LicenseInner parameters, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") LicenseUpdate parameters, Context context); + @BodyParam("application/json") LicenseUpdate parameters, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, + Response updateSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, + @BodyParam("application/json") LicenseUpdate parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") LicenseUpdate parameters, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, + Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("licenseName") String licenseName, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); + Response listByResourceGroupSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -175,32 +196,16 @@ Mono> list(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/licenses") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateLicense(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") LicenseInner parameters, Context context); - - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response validateLicenseSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") LicenseInner parameters, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -208,7 +213,7 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -216,7 +221,7 @@ Response listByResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -224,15 +229,14 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Retrieves information about the view of a license. + * The operation to validate a license. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. + * @param parameters Parameters supplied to the license validation operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -240,36 +244,63 @@ Response listBySubscriptionNextSync( * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String licenseName) { + private Mono>> validateLicenseWithResponseAsync(LicenseInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, accept, context)) + .withContext(context -> service.validateLicense(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Retrieves information about the view of a license. + * The operation to validate a license. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. + * @param parameters Parameters supplied to the license validation operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine on successful completion of {@link Mono}. + * @return describes a license in a hybrid machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String licenseName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, licenseName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Response validateLicenseWithResponse(LicenseInner parameters) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return service.validateLicenseSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, Context.NONE); } /** - * Retrieves information about the view of a license. + * The operation to validate a license. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. + * @param parameters Parameters supplied to the license validation operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -277,26 +308,119 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str * @return describes a license in a hybrid machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String licenseName, - Context context) { + private Response validateLicenseWithResponse(LicenseInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, accept, context); + return service.validateLicenseSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), parameters, accept, context); } /** - * Retrieves information about the view of a license. + * The operation to validate a license. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. + * @param parameters Parameters supplied to the license validation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 describes a license in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, LicenseInner> beginValidateLicenseAsync(LicenseInner parameters) { + Mono>> mono = validateLicenseWithResponseAsync(parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LicenseInner.class, LicenseInner.class, this.client.getContext()); + } + + /** + * The operation to validate a license. + * + * @param parameters Parameters supplied to the license validation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters) { + Response response = validateLicenseWithResponse(parameters); + return this.client.getLroResult(response, LicenseInner.class, LicenseInner.class, + Context.NONE); + } + + /** + * The operation to validate a license. + * + * @param parameters Parameters supplied to the license validation operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters, + Context context) { + Response response = validateLicenseWithResponse(parameters, context); + return this.client.getLroResult(response, LicenseInner.class, LicenseInner.class, + context); + } + + /** + * The operation to validate a license. + * + * @param parameters Parameters supplied to the license validation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateLicenseAsync(LicenseInner parameters) { + return beginValidateLicenseAsync(parameters).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to validate a license. + * + * @param parameters Parameters supplied to the license validation operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a license in a hybrid machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner getByResourceGroup(String resourceGroupName, String licenseName) { - return getByResourceGroupWithResponse(resourceGroupName, licenseName, Context.NONE).getValue(); + public LicenseInner validateLicense(LicenseInner parameters) { + return beginValidateLicense(parameters).getFinalResult(); + } + + /** + * The operation to validate a license. + * + * @param parameters Parameters supplied to the license validation operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicenseInner validateLicense(LicenseInner parameters, Context context) { + return beginValidateLicense(parameters, context).getFinalResult(); } /** @@ -314,12 +438,30 @@ public LicenseInner getByResourceGroup(String resourceGroupName, String licenseN @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String licenseName, LicenseInner parameters) { - final String contentType = "application/json"; + 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 (licenseName == null) { + return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, contentType, accept, parameters, - context)) + this.client.getSubscriptionId(), resourceGroupName, licenseName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -337,11 +479,33 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String licenseName, LicenseInner parameters) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, contentType, accept, parameters, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, licenseName, parameters, accept, Context.NONE); } /** @@ -359,10 +523,33 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String licenseName, LicenseInner parameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, contentType, accept, parameters, context); + this.client.getSubscriptionId(), resourceGroupName, licenseName, parameters, accept, context); } /** @@ -491,10 +678,30 @@ public LicenseInner createOrUpdate(String resourceGroupName, String licenseName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String licenseName, LicenseUpdate parameters) { - final String contentType = "application/json"; + 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 (licenseName == null) { + return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, contentType, accept, parameters, context)) + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, licenseName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -512,11 +719,33 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String licenseName, LicenseUpdate parameters) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, contentType, accept, parameters, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, licenseName, parameters, accept, Context.NONE); } /** @@ -534,10 +763,33 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String licenseName, LicenseUpdate parameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, contentType, accept, parameters, context); + this.client.getSubscriptionId(), resourceGroupName, licenseName, parameters, accept, context); } /** @@ -649,6 +901,110 @@ public LicenseInner update(String resourceGroupName, String licenseName, License return beginUpdate(resourceGroupName, licenseName, parameters, context).getFinalResult(); } + /** + * Retrieves information about the view of a license. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String licenseName) { + 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 (licenseName == null) { + return Mono.error(new IllegalArgumentException("Parameter licenseName 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, licenseName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Retrieves information about the view of a license. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String licenseName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, licenseName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieves information about the view of a license. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String licenseName, + 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 (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, licenseName, accept, context); + } + + /** + * Retrieves information about the view of a license. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param licenseName The name of the license. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LicenseInner getByResourceGroup(String resourceGroupName, String licenseName) { + return getByResourceGroupWithResponse(resourceGroupName, licenseName, Context.NONE).getValue(); + } + /** * The operation to delete a license. * @@ -661,9 +1017,25 @@ public LicenseInner update(String resourceGroupName, String licenseName, License */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String licenseName) { + 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 (licenseName == null) { + return Mono.error(new IllegalArgumentException("Parameter licenseName 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, licenseName, context)) + this.client.getSubscriptionId(), resourceGroupName, licenseName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -679,8 +1051,27 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String licenseName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, licenseName, accept, Context.NONE); } /** @@ -696,8 +1087,27 @@ private Response deleteWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String licenseName, 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 (licenseName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); + } + final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, licenseName, context); + this.client.getSubscriptionId(), resourceGroupName, licenseName, accept, context); } /** @@ -802,15 +1212,27 @@ public void delete(String resourceGroupName, String licenseName, Context context * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items along with {@link PagedResponse} on successful completion of + * @return the List license operation response along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (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.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -823,7 +1245,7 @@ private Mono> listByResourceGroupSinglePageAsync(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 paged collection of License items as paginated response with {@link PagedFlux}. + * @return the List license operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -838,13 +1260,27 @@ private PagedFlux listByResourceGroupAsync(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 paged collection of License items along with {@link PagedResponse}. + * @return the List license operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -857,13 +1293,27 @@ private PagedResponse listByResourceGroupSinglePage(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 paged collection of License items along with {@link PagedResponse}. + * @return the List license operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -875,7 +1325,7 @@ private PagedResponse listByResourceGroupSinglePage(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 paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -891,7 +1341,7 @@ public PagedIterable listByResourceGroup(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 paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -904,11 +1354,19 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items along with {@link PagedResponse} on successful completion of + * @return the List license operation response 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.")); + } + 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(), @@ -923,7 +1381,7 @@ private Mono> listSinglePageAsync() { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items as paginated response with {@link PagedFlux}. + * @return the List license operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -936,10 +1394,20 @@ private PagedFlux listAsync() { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } + 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); @@ -954,10 +1422,20 @@ private PagedResponse listSinglePage() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } + 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); @@ -970,7 +1448,7 @@ private PagedResponse listSinglePage(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -984,7 +1462,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -992,154 +1470,6 @@ public PagedIterable list(Context context) { nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateLicenseWithResponseAsync(LicenseInner parameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.validateLicense(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateLicenseWithResponse(LicenseInner parameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.validateLicenseSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, parameters, Context.NONE); - } - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Response validateLicenseWithResponse(LicenseInner parameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.validateLicenseSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), contentType, accept, parameters, context); - } - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseInner> beginValidateLicenseAsync(LicenseInner parameters) { - Mono>> mono = validateLicenseWithResponseAsync(parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - LicenseInner.class, LicenseInner.class, this.client.getContext()); - } - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters) { - Response response = validateLicenseWithResponse(parameters); - return this.client.getLroResult(response, LicenseInner.class, LicenseInner.class, - Context.NONE); - } - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters, - Context context) { - Response response = validateLicenseWithResponse(parameters, context); - return this.client.getLroResult(response, LicenseInner.class, LicenseInner.class, - context); - } - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateLicenseAsync(LicenseInner parameters) { - return beginValidateLicenseAsync(parameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner validateLicense(LicenseInner parameters) { - return beginValidateLicense(parameters).getFinalResult(); - } - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner validateLicense(LicenseInner parameters, Context context) { - return beginValidateLicense(parameters, context).getFinalResult(); - } - /** * Get the next page of items. * @@ -1147,11 +1477,18 @@ public LicenseInner validateLicense(LicenseInner parameters, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items along with {@link PagedResponse} on successful completion of + * @return the List license operation response 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.")); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -1168,10 +1505,19 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items along with {@link PagedResponse}. + * @return the List license operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1187,10 +1533,19 @@ 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 paged collection of License items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -1205,11 +1560,18 @@ 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 paged collection of License items along with {@link PagedResponse} on successful completion of + * @return the List license operation response 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.")); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -1226,10 +1588,19 @@ private Mono> listBySubscriptionNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1245,14 +1616,25 @@ 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 paged collection of License items along with {@link PagedResponse}. + * @return the List license operation response 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.")); + } 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(LicensesClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesImpl.java index 6e9891a80d9b..4c28fa3f9724 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -27,12 +27,34 @@ public LicensesImpl(LicensesClient innerClient, this.serviceManager = serviceManager; } + public License validateLicense(LicenseInner parameters) { + LicenseInner inner = this.serviceClient().validateLicense(parameters); + if (inner != null) { + return new LicenseImpl(inner, this.manager()); + } else { + return null; + } + } + + public License validateLicense(LicenseInner parameters, Context context) { + LicenseInner inner = this.serviceClient().validateLicense(parameters, context); + if (inner != null) { + return new LicenseImpl(inner, this.manager()); + } else { + return null; + } + } + public Response getByResourceGroupWithResponse(String resourceGroupName, String licenseName, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, licenseName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LicenseImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LicenseImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public License getByResourceGroup(String resourceGroupName, String licenseName) { @@ -72,24 +94,6 @@ public PagedIterable list(Context context) { return ResourceManagerUtils.mapPage(inner, inner1 -> new LicenseImpl(inner1, this.manager())); } - public License validateLicense(LicenseInner parameters) { - LicenseInner inner = this.serviceClient().validateLicense(parameters); - if (inner != null) { - return new LicenseImpl(inner, this.manager()); - } else { - return null; - } - } - - public License validateLicense(LicenseInner parameters, Context context) { - LicenseInner inner = this.serviceClient().validateLicense(parameters, context); - if (inner != null) { - return new LicenseImpl(inner, this.manager()); - } else { - return null; - } - } - public License getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineAssessPatchesResultImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineAssessPatchesResultImpl.java index e90ce0e6f860..ce6352ef8666 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineAssessPatchesResultImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineAssessPatchesResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.hybridcompute.models.PatchOperationStatus; import com.azure.resourcemanager.hybridcompute.models.PatchServiceUsed; import java.time.OffsetDateTime; +import java.util.UUID; public final class MachineAssessPatchesResultImpl implements MachineAssessPatchesResult { private MachineAssessPatchesResultInner innerObject; @@ -29,7 +30,7 @@ public PatchOperationStatus status() { return this.innerModel().status(); } - public String assessmentActivityId() { + public UUID assessmentActivityId() { return this.innerModel().assessmentActivityId(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionImpl.java index 59c87333f2ee..7b45603309d3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsClientImpl.java index 8dd4f1e6ccf2..4273dbbcd7d7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -31,12 +31,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.hybridcompute.fluent.MachineExtensionsClient; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.MachineExtensionsListResult; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpdate; +import com.azure.resourcemanager.hybridcompute.models.MachineExtensionsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -70,109 +71,113 @@ public final class MachineExtensionsClientImpl implements MachineExtensionsClien * The interface defining all the services for HybridComputeManagementClientMachineExtensions to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientMachineExtensions") public interface MachineExtensionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineExtensionInner extensionParameters, Context context); + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") MachineExtensionInner extensionParameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineExtensionInner extensionParameters, Context context); + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") MachineExtensionInner extensionParameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineExtensionUpdate extensionParameters, Context context); + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") MachineExtensionUpdate extensionParameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response updateSync(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineExtensionUpdate extensionParameters, Context context); + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") MachineExtensionUpdate extensionParameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, Context context); + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, Context context); + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$expand") String expand, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$expand") String expand, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -180,89 +185,15 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * The operation to get the extension. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param extensionName The name of the machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Machine Extension along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String machineName, - String extensionName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to get the extension. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param extensionName The name of the machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Machine Extension on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String machineName, String extensionName) { - return getWithResponseAsync(resourceGroupName, machineName, extensionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to get the extension. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Machine Extension along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String machineName, - String extensionName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, machineName, extensionName, accept, context); - } - - /** - * The operation to get the extension. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param extensionName The name of the machine extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Machine Extension. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MachineExtensionInner get(String resourceGroupName, String machineName, String extensionName) { - return getWithResponse(resourceGroupName, machineName, extensionName, Context.NONE).getValue(); - } - /** * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -273,12 +204,35 @@ public MachineExtensionInner get(String resourceGroupName, String machineName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName 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 (extensionParameters == null) { + return Mono + .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); + } else { + extensionParameters.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, contentType, accept, - extensionParameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, machineName, + extensionName, this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -286,7 +240,7 @@ private Mono>> createOrUpdateWithResponseAsync(String * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -297,18 +251,44 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionName is required and 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 (extensionParameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); + } else { + extensionParameters.validate(); + } final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, contentType, accept, - extensionParameters, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, accept, Context.NONE); } /** * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -320,18 +300,44 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionName is required and 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 (extensionParameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); + } else { + extensionParameters.validate(); + } final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, contentType, accept, - extensionParameters, context); + return service.createOrUpdateSync(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, accept, context); } /** * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -353,7 +359,7 @@ private PollerFlux, MachineExtensionInner> beg * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -374,7 +380,7 @@ public SyncPoller, MachineExtensionInner> begi * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -397,7 +403,7 @@ public SyncPoller, MachineExtensionInner> begi * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -416,7 +422,7 @@ private Mono createOrUpdateAsync(String resourceGroupName * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -434,7 +440,7 @@ public MachineExtensionInner createOrUpdate(String resourceGroupName, String mac * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -454,7 +460,7 @@ public MachineExtensionInner createOrUpdate(String resourceGroupName, String mac * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -465,12 +471,35 @@ public MachineExtensionInner createOrUpdate(String resourceGroupName, String mac @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String machineName, String extensionName, MachineExtensionUpdate extensionParameters) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName 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 (extensionParameters == null) { + return Mono + .error(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); + } else { + extensionParameters.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, contentType, accept, - extensionParameters, context)) + .withContext( + context -> service.update(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -478,7 +507,7 @@ private Mono>> updateWithResponseAsync(String resource * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -489,18 +518,44 @@ private Mono>> updateWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String machineName, String extensionName, MachineExtensionUpdate extensionParameters) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionName is required and 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 (extensionParameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); + } else { + extensionParameters.validate(); + } final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, contentType, accept, - extensionParameters, Context.NONE); + return service.updateSync(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, accept, Context.NONE); } /** * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -512,18 +567,44 @@ private Response updateWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response updateWithResponse(String resourceGroupName, String machineName, String extensionName, MachineExtensionUpdate extensionParameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionName is required and 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 (extensionParameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionParameters is required and cannot be null.")); + } else { + extensionParameters.validate(); + } final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, contentType, accept, - extensionParameters, context); + return service.updateSync(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, accept, context); } /** * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -546,7 +627,7 @@ private PollerFlux, MachineExtensionInner> beg * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -567,7 +648,7 @@ public SyncPoller, MachineExtensionInner> begi * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -589,7 +670,7 @@ public SyncPoller, MachineExtensionInner> begi * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -608,7 +689,7 @@ private Mono updateAsync(String resourceGroupName, String * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -626,7 +707,7 @@ public MachineExtensionInner update(String resourceGroupName, String machineName * The operation to create or update the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. * @param extensionParameters Parameters supplied to the Create Machine Extension operation. * @param context The context to associate with this operation. @@ -646,7 +727,7 @@ public MachineExtensionInner update(String resourceGroupName, String machineName * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -656,9 +737,28 @@ public MachineExtensionInner update(String resourceGroupName, String machineName @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String machineName, String extensionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, machineName, + extensionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -666,7 +766,7 @@ private Mono>> deleteWithResponseAsync(String resource * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -676,15 +776,38 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String machineName, String extensionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, Context.NONE); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionName is required and 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"; + return service.deleteSync(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); } /** * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -695,15 +818,38 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String machineName, String extensionName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, extensionName, context); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionName is required and 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"; + return service.deleteSync(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -722,7 +868,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -740,7 +886,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -759,7 +905,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -776,7 +922,7 @@ private Mono deleteAsync(String resourceGroupName, String machineName, Str * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -791,7 +937,7 @@ public void delete(String resourceGroupName, String machineName, String extensio * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -803,25 +949,154 @@ public void delete(String resourceGroupName, String machineName, String extensio beginDelete(resourceGroupName, machineName, extensionName, context).getFinalResult(); } + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Machine Extension along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String machineName, + String extensionName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, machineName, + extensionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Machine Extension on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String machineName, String extensionName) { + return getWithResponseAsync(resourceGroupName, machineName, extensionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Machine Extension along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String machineName, + String extensionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensionName is required and 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"; + return service.getSync(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * The operation to get the extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the machine containing the extension. + * @param extensionName The name of the machine extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Machine Extension. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineExtensionInner get(String resourceGroupName, String machineName, String extensionName) { + return getWithResponse(resourceGroupName, machineName, extensionName, Context.NONE).getValue(); + } + /** * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items along with {@link PagedResponse} on successful completion of + * @return describes the Machine Extensions List Result along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String machineName, String expand) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName 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(), resourceGroupName, machineName, expand, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, machineName, expand, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -831,12 +1106,12 @@ private Mono> listSinglePageAsync(String re * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items as paginated response with {@link PagedFlux}. + * @return describes the Machine Extensions List Result as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String machineName, String expand) { @@ -848,11 +1123,11 @@ private PagedFlux listAsync(String resourceGroupName, Str * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items as paginated response with {@link PagedFlux}. + * @return describes the Machine Extensions List Result as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String machineName) { @@ -865,20 +1140,37 @@ private PagedFlux listAsync(String resourceGroupName, Str * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items along with {@link PagedResponse}. + * @return describes the Machine Extensions List Result along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String machineName, String expand) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and 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(), - resourceGroupName, machineName, expand, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), resourceGroupName, + machineName, expand, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -887,21 +1179,38 @@ private PagedResponse listSinglePage(String resourceGroup * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items along with {@link PagedResponse}. + * @return describes the Machine Extensions List Result along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String machineName, String expand, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and 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(), - resourceGroupName, machineName, expand, accept, context); + Response res = service.listSync(this.client.getEndpoint(), resourceGroupName, + machineName, expand, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -910,11 +1219,11 @@ private PagedResponse listSinglePage(String resourceGroup * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items as paginated response with {@link PagedIterable}. + * @return describes the Machine Extensions List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String machineName) { @@ -927,13 +1236,13 @@ public PagedIterable list(String resourceGroupName, Strin * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items as paginated response with {@link PagedIterable}. + * @return describes the Machine Extensions List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String machineName, String expand, @@ -949,11 +1258,18 @@ public PagedIterable list(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 paged collection of MachineExtension items along with {@link PagedResponse} on successful completion of + * @return describes the Machine Extensions List Result 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(), @@ -968,10 +1284,19 @@ private Mono> listNextSinglePageAsync(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 paged collection of MachineExtension items along with {@link PagedResponse}. + * @return describes the Machine Extensions List Result 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); @@ -987,14 +1312,25 @@ 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 paged collection of MachineExtension items along with {@link PagedResponse}. + * @return describes the Machine Extensions List Result 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(MachineExtensionsClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsImpl.java index 22a28092816d..458769f1813c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -27,12 +27,24 @@ public MachineExtensionsImpl(MachineExtensionsClient innerClient, this.serviceManager = serviceManager; } + public void delete(String resourceGroupName, String machineName, String extensionName) { + this.serviceClient().delete(resourceGroupName, machineName, extensionName); + } + + public void delete(String resourceGroupName, String machineName, String extensionName, Context context) { + this.serviceClient().delete(resourceGroupName, machineName, extensionName, context); + } + public Response getWithResponse(String resourceGroupName, String machineName, String extensionName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, machineName, extensionName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MachineExtensionImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MachineExtensionImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public MachineExtension get(String resourceGroupName, String machineName, String extensionName) { @@ -44,14 +56,6 @@ public MachineExtension get(String resourceGroupName, String machineName, String } } - public void delete(String resourceGroupName, String machineName, String extensionName) { - this.serviceClient().delete(resourceGroupName, machineName, extensionName); - } - - public void delete(String resourceGroupName, String machineName, String extensionName, Context context) { - this.serviceClient().delete(resourceGroupName, machineName, extensionName, context); - } - public PagedIterable list(String resourceGroupName, String machineName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, machineName); return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineExtensionImpl(inner1, this.manager())); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineImpl.java index e49501862f13..a4d5fff149c3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineImpl.java @@ -1,13 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; -import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.Context; import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner; @@ -20,13 +18,11 @@ import com.azure.resourcemanager.hybridcompute.models.HardwareProfile; import com.azure.resourcemanager.hybridcompute.models.Identity; import com.azure.resourcemanager.hybridcompute.models.IdentityKeyStore; -import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; import com.azure.resourcemanager.hybridcompute.models.LicenseProfileMachineInstanceView; import com.azure.resourcemanager.hybridcompute.models.LocationData; import com.azure.resourcemanager.hybridcompute.models.Machine; import com.azure.resourcemanager.hybridcompute.models.MachineExtension; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceView; -import com.azure.resourcemanager.hybridcompute.models.MachineUpdate; import com.azure.resourcemanager.hybridcompute.models.NetworkProfile; import com.azure.resourcemanager.hybridcompute.models.OSProfile; import com.azure.resourcemanager.hybridcompute.models.ServiceStatuses; @@ -36,13 +32,19 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.UUID; import java.util.stream.Collectors; -public final class MachineImpl implements Machine, Machine.Definition, Machine.Update { +public final class MachineImpl implements Machine { private MachineInner innerObject; private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; + MachineImpl(MachineInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + public String id() { return this.innerModel().id(); } @@ -161,7 +163,7 @@ public String agentVersion() { return this.innerModel().agentVersion(); } - public String vmId() { + public UUID vmId() { return this.innerModel().vmId(); } @@ -197,7 +199,7 @@ public String osType() { return this.innerModel().osType(); } - public String vmUuid() { + public UUID vmUuid() { return this.innerModel().vmUuid(); } @@ -264,18 +266,6 @@ public NetworkProfile networkProfile() { } } - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - public MachineInner innerModel() { return this.innerObject; } @@ -283,255 +273,4 @@ public MachineInner innerModel() { private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { return this.serviceManager; } - - private String resourceGroupName; - - private String machineName; - - private String createExpand; - - private MachineUpdate updateParameters; - - public MachineImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Machine create() { - this.innerObject = serviceManager.serviceClient() - .getMachines() - .createOrUpdateWithResponse(resourceGroupName, machineName, this.innerModel(), createExpand, Context.NONE) - .getValue(); - return this; - } - - public Machine create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMachines() - .createOrUpdateWithResponse(resourceGroupName, machineName, this.innerModel(), createExpand, context) - .getValue(); - return this; - } - - MachineImpl(String name, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = new MachineInner(); - this.serviceManager = serviceManager; - this.machineName = name; - this.createExpand = null; - } - - public MachineImpl update() { - this.updateParameters = new MachineUpdate(); - return this; - } - - public Machine apply() { - this.innerObject = serviceManager.serviceClient() - .getMachines() - .updateWithResponse(resourceGroupName, machineName, updateParameters, Context.NONE) - .getValue(); - return this; - } - - public Machine apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getMachines() - .updateWithResponse(resourceGroupName, machineName, updateParameters, context) - .getValue(); - return this; - } - - MachineImpl(MachineInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.machineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "machines"); - } - - public Machine refresh() { - InstanceViewTypes localExpand = null; - this.innerObject = serviceManager.serviceClient() - .getMachines() - .getByResourceGroupWithResponse(resourceGroupName, machineName, localExpand, Context.NONE) - .getValue(); - return this; - } - - public Machine refresh(Context context) { - InstanceViewTypes localExpand = null; - this.innerObject = serviceManager.serviceClient() - .getMachines() - .getByResourceGroupWithResponse(resourceGroupName, machineName, localExpand, context) - .getValue(); - return this; - } - - public MachineImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public MachineImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public MachineImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public MachineImpl withIdentity(Identity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateParameters.withIdentity(identity); - return this; - } - } - - public MachineImpl withKind(ArcKindEnum kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateParameters.withKind(kind); - return this; - } - } - - public MachineImpl withLocationData(LocationData locationData) { - if (isInCreateMode()) { - this.innerModel().withLocationData(locationData); - return this; - } else { - this.updateParameters.withLocationData(locationData); - return this; - } - } - - public MachineImpl withServiceStatuses(ServiceStatuses serviceStatuses) { - this.innerModel().withServiceStatuses(serviceStatuses); - return this; - } - - public MachineImpl withCloudMetadata(CloudMetadata cloudMetadata) { - if (isInCreateMode()) { - this.innerModel().withCloudMetadata(cloudMetadata); - return this; - } else { - this.updateParameters.withCloudMetadata(cloudMetadata); - return this; - } - } - - public MachineImpl withAgentUpgrade(AgentUpgrade agentUpgrade) { - if (isInCreateMode()) { - this.innerModel().withAgentUpgrade(agentUpgrade); - return this; - } else { - this.updateParameters.withAgentUpgrade(agentUpgrade); - return this; - } - } - - public MachineImpl withOsProfile(OSProfile osProfile) { - if (isInCreateMode()) { - this.innerModel().withOsProfile(osProfile); - return this; - } else { - this.updateParameters.withOsProfile(osProfile); - return this; - } - } - - public MachineImpl withLicenseProfile(LicenseProfileMachineInstanceViewInner licenseProfile) { - this.innerModel().withLicenseProfile(licenseProfile); - return this; - } - - public MachineImpl withVmId(String vmId) { - this.innerModel().withVmId(vmId); - return this; - } - - public MachineImpl withClientPublicKey(String clientPublicKey) { - this.innerModel().withClientPublicKey(clientPublicKey); - return this; - } - - public MachineImpl withIdentityKeyStore(IdentityKeyStore identityKeyStore) { - this.innerModel().withIdentityKeyStore(identityKeyStore); - return this; - } - - public MachineImpl withTpmEkCertificate(String tpmEkCertificate) { - if (isInCreateMode()) { - this.innerModel().withTpmEkCertificate(tpmEkCertificate); - return this; - } else { - this.updateParameters.withTpmEkCertificate(tpmEkCertificate); - return this; - } - } - - public MachineImpl withOsType(String osType) { - this.innerModel().withOsType(osType); - return this; - } - - public MachineImpl withExtensions(List extensions) { - this.innerModel().withExtensions(extensions); - return this; - } - - public MachineImpl withPrivateLinkScopeResourceId(String privateLinkScopeResourceId) { - if (isInCreateMode()) { - this.innerModel().withPrivateLinkScopeResourceId(privateLinkScopeResourceId); - return this; - } else { - this.updateParameters.withPrivateLinkScopeResourceId(privateLinkScopeResourceId); - return this; - } - } - - public MachineImpl withParentClusterResourceId(String parentClusterResourceId) { - if (isInCreateMode()) { - this.innerModel().withParentClusterResourceId(parentClusterResourceId); - return this; - } else { - this.updateParameters.withParentClusterResourceId(parentClusterResourceId); - return this; - } - } - - public MachineImpl withHardwareResourceId(String hardwareResourceId) { - this.innerModel().withHardwareResourceId(hardwareResourceId); - return this; - } - - public MachineImpl withMssqlDiscovered(String mssqlDiscovered) { - this.innerModel().withMssqlDiscovered(mssqlDiscovered); - return this; - } - - public MachineImpl withExpand(String expand) { - this.createExpand = expand; - return this; - } - - public MachineImpl withIdentityKeyStore(String identityKeyStore) { - this.updateParameters.withIdentityKeyStore(identityKeyStore); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel() == null || this.innerModel().id() == null; - } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineInstallPatchesResultImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineInstallPatchesResultImpl.java index 8f0e4f7a1d37..45e828577edb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineInstallPatchesResultImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineInstallPatchesResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinePropertiesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinePropertiesImpl.java index 5633d015d26a..b1b574988ca0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinePropertiesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinePropertiesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -27,6 +27,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.UUID; public final class MachinePropertiesImpl implements MachineProperties { private MachinePropertiesInner innerObject; @@ -109,7 +110,7 @@ public String agentVersion() { return this.innerModel().agentVersion(); } - public String vmId() { + public UUID vmId() { return this.innerModel().vmId(); } @@ -145,7 +146,7 @@ public String osType() { return this.innerModel().osType(); } - public String vmUuid() { + public UUID vmUuid() { return this.innerModel().vmUuid(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandImpl.java index 59f23d18101f..0b5386c5d7c0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsClientImpl.java index ac795ff6ca05..349293fd897e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -30,11 +30,12 @@ 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.hybridcompute.fluent.MachineRunCommandsClient; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.MachineRunCommandsListResult; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandsListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,89 +69,91 @@ public final class MachineRunCommandsClientImpl implements MachineRunCommandsCli * The interface defining all the services for HybridComputeManagementClientMachineRunCommands to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientMachineRunCommands") public interface MachineRunCommandsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("runCommandName") String runCommandName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("runCommandName") String runCommandName, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("runCommandName") String runCommandName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineRunCommandInner runCommandProperties, Context context); + @PathParam("runCommandName") String runCommandName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") MachineRunCommandInner runCommandProperties, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response createOrUpdateSync(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("runCommandName") String runCommandName, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineRunCommandInner runCommandProperties, Context context); + @PathParam("runCommandName") String runCommandName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") MachineRunCommandInner runCommandProperties, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("runCommandName") String runCommandName, Context context); + @PathParam("runCommandName") String runCommandName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response deleteSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @PathParam("runCommandName") String runCommandName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @PathParam("runCommandName") String runCommandName, Context context); + @PathParam("runCommandName") String runCommandName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @PathParam("runCommandName") String runCommandName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$expand") String expand, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response listSync(@HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$expand") String expand, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -158,84 +161,10 @@ Mono> listNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * The operation to get a run command. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param runCommandName The name of the run command. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Run Command along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String machineName, - String runCommandName) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, runCommandName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to get a run command. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param runCommandName The name of the run command. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Run Command on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String machineName, String runCommandName) { - return getWithResponseAsync(resourceGroupName, machineName, runCommandName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to get a run command. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param runCommandName The name of the run command. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Run Command along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String machineName, - String runCommandName, Context context) { - final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, machineName, runCommandName, accept, context); - } - - /** - * The operation to get a run command. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param runCommandName The name of the run command. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Run Command. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MachineRunCommandInner get(String resourceGroupName, String machineName, String runCommandName) { - return getWithResponse(resourceGroupName, machineName, runCommandName, Context.NONE).getValue(); - } - /** * The operation to create or update a run command. * @@ -251,12 +180,35 @@ public MachineRunCommandInner get(String resourceGroupName, String machineName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String machineName, String runCommandName, MachineRunCommandInner runCommandProperties) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (runCommandName == null) { + return Mono.error(new IllegalArgumentException("Parameter runCommandName 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 (runCommandProperties == null) { + return Mono + .error(new IllegalArgumentException("Parameter runCommandProperties is required and cannot be null.")); + } else { + runCommandProperties.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, runCommandName, contentType, accept, - runCommandProperties, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, machineName, + runCommandName, this.client.getApiVersion(), this.client.getSubscriptionId(), runCommandProperties, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -275,11 +227,37 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String machineName, String runCommandName, MachineRunCommandInner runCommandProperties) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (runCommandName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runCommandName is required and 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 (runCommandProperties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runCommandProperties is required and cannot be null.")); + } else { + runCommandProperties.validate(); + } final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, runCommandName, contentType, accept, - runCommandProperties, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), resourceGroupName, machineName, runCommandName, + this.client.getApiVersion(), this.client.getSubscriptionId(), runCommandProperties, accept, Context.NONE); } /** @@ -298,11 +276,37 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String machineName, String runCommandName, MachineRunCommandInner runCommandProperties, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (runCommandName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runCommandName is required and 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 (runCommandProperties == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runCommandProperties is required and cannot be null.")); + } else { + runCommandProperties.validate(); + } final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, runCommandName, contentType, accept, - runCommandProperties, context); + return service.createOrUpdateSync(this.client.getEndpoint(), resourceGroupName, machineName, runCommandName, + this.client.getApiVersion(), this.client.getSubscriptionId(), runCommandProperties, accept, context); } /** @@ -445,9 +449,28 @@ public MachineRunCommandInner createOrUpdate(String resourceGroupName, String ma @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String machineName, String runCommandName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (runCommandName == null) { + return Mono.error(new IllegalArgumentException("Parameter runCommandName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, runCommandName, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, machineName, + runCommandName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -465,8 +488,31 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String machineName, String runCommandName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, runCommandName, Context.NONE); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (runCommandName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runCommandName is required and 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"; + return service.deleteSync(this.client.getEndpoint(), resourceGroupName, machineName, runCommandName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); } /** @@ -484,8 +530,31 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String machineName, String runCommandName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, runCommandName, context); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (runCommandName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runCommandName is required and 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"; + return service.deleteSync(this.client.getEndpoint(), resourceGroupName, machineName, runCommandName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** @@ -592,6 +661,120 @@ public void delete(String resourceGroupName, String machineName, String runComma beginDelete(resourceGroupName, machineName, runCommandName, context).getFinalResult(); } + /** + * The operation to get a run command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Run Command along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String machineName, + String runCommandName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (runCommandName == null) { + return Mono.error(new IllegalArgumentException("Parameter runCommandName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, machineName, + runCommandName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to get a run command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Run Command on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String machineName, String runCommandName) { + return getWithResponseAsync(resourceGroupName, machineName, runCommandName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The operation to get a run command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Run Command along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String machineName, + String runCommandName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (runCommandName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter runCommandName is required and 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"; + return service.getSync(this.client.getEndpoint(), resourceGroupName, machineName, runCommandName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * The operation to get a run command. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Run Command. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineRunCommandInner get(String resourceGroupName, String machineName, String runCommandName) { + return getWithResponse(resourceGroupName, machineName, runCommandName, Context.NONE).getValue(); + } + /** * The operation to get all the run commands of a non-Azure machine. * @@ -601,16 +784,31 @@ public void delete(String resourceGroupName, String machineName, String runComma * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineRunCommand items along with {@link PagedResponse} on successful completion of + * @return describes the Run Commands List Result along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String machineName, String expand) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName 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(), resourceGroupName, machineName, expand, accept, context)) + .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, machineName, expand, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -625,7 +823,7 @@ private Mono> listSinglePageAsync(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 paged collection of MachineRunCommand items as paginated response with {@link PagedFlux}. + * @return describes the Run Commands List Result as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String machineName, String expand) { @@ -641,7 +839,7 @@ private PagedFlux listAsync(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 paged collection of MachineRunCommand items as paginated response with {@link PagedFlux}. + * @return describes the Run Commands List Result as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String machineName) { @@ -659,15 +857,32 @@ private PagedFlux listAsync(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 paged collection of MachineRunCommand items along with {@link PagedResponse}. + * @return describes the Run Commands List Result along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String machineName, String expand) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and 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(), - resourceGroupName, machineName, expand, accept, Context.NONE); + Response res = service.listSync(this.client.getEndpoint(), resourceGroupName, + machineName, expand, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -682,15 +897,32 @@ private PagedResponse listSinglePage(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineRunCommand items along with {@link PagedResponse}. + * @return describes the Run Commands List Result along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listSinglePage(String resourceGroupName, String machineName, String expand, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and 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(), - resourceGroupName, machineName, expand, accept, context); + Response res = service.listSync(this.client.getEndpoint(), resourceGroupName, + machineName, expand, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -703,7 +935,7 @@ private PagedResponse listSinglePage(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineRunCommand items as paginated response with {@link PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String machineName) { @@ -722,7 +954,7 @@ public PagedIterable list(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 paged collection of MachineRunCommand items as paginated response with {@link PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String machineName, String expand, @@ -738,11 +970,18 @@ public PagedIterable list(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 paged collection of MachineRunCommand items along with {@link PagedResponse} on successful completion of + * @return describes the Run Commands List Result 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(), @@ -757,10 +996,19 @@ private Mono> listNextSinglePageAsync(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 paged collection of MachineRunCommand items along with {@link PagedResponse}. + * @return describes the Run Commands List Result 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); @@ -776,14 +1024,25 @@ 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 paged collection of MachineRunCommand items along with {@link PagedResponse}. + * @return describes the Run Commands List Result 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(MachineRunCommandsClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsImpl.java index d33d415140e2..2921e1640a0c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -27,12 +27,24 @@ public MachineRunCommandsImpl(MachineRunCommandsClient innerClient, this.serviceManager = serviceManager; } + public void delete(String resourceGroupName, String machineName, String runCommandName) { + this.serviceClient().delete(resourceGroupName, machineName, runCommandName); + } + + public void delete(String resourceGroupName, String machineName, String runCommandName, Context context) { + this.serviceClient().delete(resourceGroupName, machineName, runCommandName, context); + } + public Response getWithResponse(String resourceGroupName, String machineName, String runCommandName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, machineName, runCommandName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MachineRunCommandImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MachineRunCommandImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public MachineRunCommand get(String resourceGroupName, String machineName, String runCommandName) { @@ -44,14 +56,6 @@ public MachineRunCommand get(String resourceGroupName, String machineName, Strin } } - public void delete(String resourceGroupName, String machineName, String runCommandName) { - this.serviceClient().delete(resourceGroupName, machineName, runCommandName); - } - - public void delete(String resourceGroupName, String machineName, String runCommandName, Context context) { - this.serviceClient().delete(resourceGroupName, machineName, runCommandName, context); - } - public PagedIterable list(String resourceGroupName, String machineName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, machineName); return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineRunCommandImpl(inner1, this.manager())); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesClientImpl.java index 2ebba17ab0cc..1477eba7e803 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -12,10 +12,8 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -32,16 +30,16 @@ 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.hybridcompute.fluent.MachinesClient; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineAssessPatchesResultInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInstallPatchesResultInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.MachineListResult; import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters; -import com.azure.resourcemanager.hybridcompute.models.MachineUpdate; +import com.azure.resourcemanager.hybridcompute.models.MachineListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -74,88 +72,88 @@ public final class MachinesClientImpl implements MachinesClient { * The interface defining all the services for HybridComputeManagementClientMachines to be used by the proxy service * to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientMachines") public interface MachinesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") - @ExpectedResponses({ 200 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @QueryParam("$expand") InstanceViewTypes expand, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") - @ExpectedResponses({ 200 }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + Response deleteSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @QueryParam("$expand") InstanceViewTypes expand, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate(@HostParam("endpoint") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @QueryParam("$expand") String expand, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") MachineInner parameters, - Context context); + @QueryParam("$expand") InstanceViewTypes expand, @HeaderParam("Accept") String accept, Context context); - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + Response getByResourceGroupSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @QueryParam("$expand") String expand, @HeaderParam("Content-Type") String contentType, - @HeaderParam("Accept") String accept, @BodyParam("application/json") MachineInner parameters, - Context context); + @QueryParam("$expand") InstanceViewTypes expand, @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") - @ExpectedResponses({ 200 }) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, + Mono>> assessPatches(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineUpdate parameters, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, + @HeaderParam("Accept") String accept, Context context); - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") - @ExpectedResponses({ 200 }) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, + Response assessPatchesSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineUpdate parameters, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, + Mono>> installPatches(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, + @BodyParam("application/json") MachineInstallPatchesParameters installPatchesInput, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") - @ExpectedResponses({ 202, 204 }) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response deleteSync(@HostParam("endpoint") String endpoint, + Response installPatchesSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, + @BodyParam("application/json") MachineInstallPatchesParameters installPatchesInput, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); @@ -164,7 +162,7 @@ Mono> listByResourceGroup(@HostParam("endpoint") Str @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + Response listByResourceGroupSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); @@ -173,7 +171,7 @@ Response listByResourceGroupSync(@HostParam("endpoint") Strin @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @@ -181,52 +179,16 @@ Mono> list(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> assessPatches(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response assessPatchesSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, - @HeaderParam("Accept") String accept, Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> installPatches(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineInstallPatchesParameters installPatchesInput, Context context); - - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response installPatchesSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") MachineInstallPatchesParameters installPatchesInput, 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, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -234,7 +196,7 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByResourceGroupNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -242,7 +204,7 @@ Response listByResourceGroupNextSync( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -250,246 +212,10 @@ Mono> listBySubscriptionNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listBySubscriptionNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } - /** - * Retrieves information about the model view or the instance view of a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param expand The expand expression to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String machineName, InstanceViewTypes expand) { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, expand, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves information about the model view or the instance view of a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String machineName) { - final InstanceViewTypes expand = null; - return getByResourceGroupWithResponseAsync(resourceGroupName, machineName, expand) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves information about the model view or the instance view of a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param expand The expand expression to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, - InstanceViewTypes expand, Context context) { - final String accept = "application/json"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, expand, accept, context); - } - - /** - * Retrieves information about the model view or the instance view of a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MachineInner getByResourceGroup(String resourceGroupName, String machineName) { - final InstanceViewTypes expand = null; - return getByResourceGroupWithResponse(resourceGroupName, machineName, expand, Context.NONE).getValue(); - } - - /** - * The operation to create or update a hybrid machine. Please note some properties can be set only during machine - * creation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create hybrid machine operation. - * @param expand Expands referenced resources. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String machineName, - MachineInner parameters, String expand) { - 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, machineName, expand, contentType, accept, - parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to create or update a hybrid machine. Please note some properties can be set only during machine - * creation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create hybrid machine operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String machineName, - MachineInner parameters) { - final String expand = null; - return createOrUpdateWithResponseAsync(resourceGroupName, machineName, parameters, expand) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to create or update a hybrid machine. Please note some properties can be set only during machine - * creation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create hybrid machine operation. - * @param expand Expands referenced resources. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String machineName, - MachineInner parameters, String expand, 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, machineName, expand, contentType, accept, parameters, - context); - } - - /** - * The operation to create or update a hybrid machine. Please note some properties can be set only during machine - * creation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create hybrid machine operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MachineInner createOrUpdate(String resourceGroupName, String machineName, MachineInner parameters) { - final String expand = null; - return createOrUpdateWithResponse(resourceGroupName, machineName, parameters, expand, Context.NONE).getValue(); - } - - /** - * The operation to update a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update hybrid machine operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String machineName, - MachineUpdate parameters) { - final String contentType = "application/json"; - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, contentType, accept, parameters, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to update a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update hybrid machine operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String machineName, MachineUpdate parameters) { - return updateWithResponseAsync(resourceGroupName, machineName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The operation to update a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update hybrid machine operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String machineName, - MachineUpdate parameters, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, contentType, accept, parameters, context); - } - - /** - * The operation to update a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update hybrid machine operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MachineInner update(String resourceGroupName, String machineName, MachineUpdate parameters) { - return updateWithResponse(resourceGroupName, machineName, parameters, Context.NONE).getValue(); - } - /** * The operation to delete a hybrid machine. * @@ -502,9 +228,25 @@ public MachineInner update(String resourceGroupName, String machineName, Machine */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String machineName) { + 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 (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName 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, machineName, context)) + this.client.getSubscriptionId(), resourceGroupName, machineName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -520,8 +262,27 @@ private Mono>> deleteWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String machineName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, machineName, accept, Context.NONE); } /** @@ -537,8 +298,27 @@ private Response deleteWithResponse(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String machineName, 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + final String accept = "application/json"; return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, context); + this.client.getSubscriptionId(), resourceGroupName, machineName, accept, context); } /** @@ -637,244 +417,116 @@ public void delete(String resourceGroupName, String machineName, Context context } /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. + * Retrieves information about the model view or the instance view of a hybrid machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand Expands referenced resources. + * @param machineName The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return describes a hybrid machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String expand) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String machineName, InstanceViewTypes expand) { + 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 (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName 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, expand, 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, machineName, expand, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand Expands referenced resources. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String expand = null; - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand Expands referenced resources. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String expand) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, expand, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. + * Retrieves information about the model view or the instance view of a hybrid machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand Expands referenced resources. - * @param context The context to associate with this operation. + * @param machineName The name of the hybrid 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 of a Machine list operation along with {@link PagedResponse}. + * @return describes a hybrid machine on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String expand, - Context context) { - final String accept = "application/json"; - Response res = service.listByResourceGroupSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, expand, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String expand = null; - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, expand), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + private Mono getByResourceGroupAsync(String resourceGroupName, String machineName) { + final InstanceViewTypes expand = null; + return getByResourceGroupWithResponseAsync(resourceGroupName, machineName, expand) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. + * Retrieves information about the model view or the instance view of a hybrid machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand Expands referenced resources. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, expand, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); - } - - /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. - * + * @param machineName The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation along with {@link PagedResponse}. + * @return describes a hybrid machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, + InstanceViewTypes expand, 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName 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); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, expand, accept, context); } /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. + * Retrieves information about the model view or the instance view of a hybrid machine. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid 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 of a Machine list operation as paginated response with {@link PagedIterable}. + * @return describes a hybrid machine. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), - nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineInner getByResourceGroup(String resourceGroupName, String machineName) { + final InstanceViewTypes expand = null; + return getByResourceGroupWithResponse(resourceGroupName, machineName, expand, Context.NONE).getValue(); } /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -884,6 +536,21 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> assessPatchesWithResponseAsync(String resourceGroupName, String name) { + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.assessPatches(this.client.getEndpoint(), this.client.getApiVersion(), @@ -894,7 +561,7 @@ private Mono>> assessPatchesWithResponseAsync(String r /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -903,6 +570,23 @@ private Mono>> assessPatchesWithResponseAsync(String r */ @ServiceMethod(returns = ReturnType.SINGLE) private Response assessPatchesWithResponse(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (name == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } final String accept = "application/json"; return service.assessPatchesSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, name, accept, Context.NONE); @@ -911,7 +595,7 @@ private Response assessPatchesWithResponse(String resourceGroupName, /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -921,6 +605,23 @@ private Response assessPatchesWithResponse(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) private Response assessPatchesWithResponse(String resourceGroupName, String name, 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 (name == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } final String accept = "application/json"; return service.assessPatchesSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, name, accept, context); @@ -929,7 +630,7 @@ private Response assessPatchesWithResponse(String resourceGroupName, /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -948,7 +649,7 @@ private Response assessPatchesWithResponse(String resourceGroupName, /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -966,7 +667,7 @@ private Response assessPatchesWithResponse(String resourceGroupName, /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -985,7 +686,7 @@ private Response assessPatchesWithResponse(String resourceGroupName, /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1000,7 +701,7 @@ private Mono assessPatchesAsync(String resource /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1015,7 +716,7 @@ public MachineAssessPatchesResultInner assessPatches(String resourceGroupName, S /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1031,7 +732,7 @@ public MachineAssessPatchesResultInner assessPatches(String resourceGroupName, S /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1043,19 +744,38 @@ public MachineAssessPatchesResultInner assessPatches(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> installPatchesWithResponseAsync(String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput) { - final String contentType = "application/json"; + 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (installPatchesInput == null) { + return Mono + .error(new IllegalArgumentException("Parameter installPatchesInput is required and cannot be null.")); + } else { + installPatchesInput.validate(); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.installPatches(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, name, contentType, accept, installPatchesInput, - context)) + this.client.getSubscriptionId(), resourceGroupName, name, installPatchesInput, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1066,17 +786,38 @@ private Mono>> installPatchesWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response installPatchesWithResponse(String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (name == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (installPatchesInput == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter installPatchesInput is required and cannot be null.")); + } else { + installPatchesInput.validate(); + } final String accept = "application/json"; return service.installPatchesSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, name, contentType, accept, installPatchesInput, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, name, installPatchesInput, accept, Context.NONE); } /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @param context The context to associate with this operation. @@ -1088,17 +829,38 @@ private Response installPatchesWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response installPatchesWithResponse(String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (name == null) { + throw LOGGER.atError().log(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (installPatchesInput == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter installPatchesInput is required and cannot be null.")); + } else { + installPatchesInput.validate(); + } final String accept = "application/json"; return service.installPatchesSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, name, contentType, accept, installPatchesInput, - context); + this.client.getSubscriptionId(), resourceGroupName, name, installPatchesInput, accept, context); } /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1120,7 +882,7 @@ private Response installPatchesWithResponse(String resourceGroupName /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1140,7 +902,7 @@ private Response installPatchesWithResponse(String resourceGroupName /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @param context The context to associate with this operation. @@ -1162,7 +924,7 @@ private Response installPatchesWithResponse(String resourceGroupName /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1180,7 +942,7 @@ private Mono installPatchesAsync(String resour /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1197,7 +959,7 @@ public MachineInstallPatchesResultInner installPatches(String resourceGroupName, /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @param context The context to associate with this operation. @@ -1212,6 +974,309 @@ public MachineInstallPatchesResultInner installPatches(String resourceGroupName, return beginInstallPatches(resourceGroupName, name, installPatchesInput, context).getFinalResult(); } + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String expand) { + 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, expand, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String expand = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param expand Expands referenced resources. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String expand) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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, expand, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param expand Expands referenced resources. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String expand, + 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, expand, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String expand = null; + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, expand), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); + } + + /** + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param expand Expands referenced resources. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, expand, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response 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.")); + } + 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(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response 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.")); + } + 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); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response 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.")); + } + 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); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); + } + /** * Get the next page of items. * @@ -1219,11 +1284,18 @@ public MachineInstallPatchesResultInner installPatches(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 response of a Machine list operation along with {@link PagedResponse} on successful completion of + * @return the List hybrid machine operation response 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.")); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -1240,10 +1312,19 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation along with {@link PagedResponse}. + * @return the List hybrid machine operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1259,10 +1340,19 @@ 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 the response of a Machine list operation along with {@link PagedResponse}. + * @return the List hybrid machine operation response 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.")); + } final String accept = "application/json"; Response res = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); @@ -1277,11 +1367,18 @@ 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 the response of a Machine list operation along with {@link PagedResponse} on successful completion of + * @return the List hybrid machine operation response 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.")); + } final String accept = "application/json"; return FluxUtil .withContext( @@ -1298,10 +1395,19 @@ private Mono> listBySubscriptionNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation along with {@link PagedResponse}. + * @return the List hybrid machine operation response 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.")); + } final String accept = "application/json"; Response res = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -1317,14 +1423,25 @@ 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 the response of a Machine list operation along with {@link PagedResponse}. + * @return the List hybrid machine operation response 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.")); + } 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(MachinesClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesImpl.java index db21a1e549f4..ba8392f14ee3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -33,12 +33,24 @@ public MachinesImpl(MachinesClient innerClient, this.serviceManager = serviceManager; } + public void deleteByResourceGroup(String resourceGroupName, String machineName) { + this.serviceClient().delete(resourceGroupName, machineName); + } + + public void delete(String resourceGroupName, String machineName, Context context) { + this.serviceClient().delete(resourceGroupName, machineName, context); + } + public Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, InstanceViewTypes expand, Context context) { Response inner = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, machineName, expand, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new MachineImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new MachineImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public Machine getByResourceGroup(String resourceGroupName, String machineName) { @@ -50,35 +62,6 @@ public Machine getByResourceGroup(String resourceGroupName, String machineName) } } - public void deleteByResourceGroup(String resourceGroupName, String machineName) { - this.serviceClient().delete(resourceGroupName, machineName); - } - - public void delete(String resourceGroupName, String machineName, Context context) { - this.serviceClient().delete(resourceGroupName, machineName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, expand, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); - } - public MachineAssessPatchesResult assessPatches(String resourceGroupName, String name) { MachineAssessPatchesResultInner inner = this.serviceClient().assessPatches(resourceGroupName, name); if (inner != null) { @@ -119,62 +102,25 @@ public MachineInstallPatchesResult installPatches(String resourceGroupName, Stri } } - public Machine 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 machineName = ResourceManagerUtils.getValueFromIdByName(id, "machines"); - if (machineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); - } - InstanceViewTypes localExpand = null; - return this.getByResourceGroupWithResponse(resourceGroupName, machineName, localExpand, Context.NONE) - .getValue(); + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); } - public Response getByIdWithResponse(String id, InstanceViewTypes expand, 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 machineName = ResourceManagerUtils.getValueFromIdByName(id, "machines"); - if (machineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, machineName, expand, context); + public PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, expand, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); } - 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 machineName = ResourceManagerUtils.getValueFromIdByName(id, "machines"); - if (machineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); - } - this.delete(resourceGroupName, machineName, Context.NONE); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); } - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String machineName = ResourceManagerUtils.getValueFromIdByName(id, "machines"); - if (machineName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); - } - this.delete(resourceGroupName, machineName, context); + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); } private MachinesClient serviceClient() { @@ -184,8 +130,4 @@ private MachinesClient serviceClient() { private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { return this.serviceManager; } - - public MachineImpl define(String name) { - return new MachineImpl(name, this.manager()); - } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfileImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfileImpl.java index b3fbb188d196..e7e2afbbc326 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfileImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfileImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesClientImpl.java index ae42a2f09e03..83384093224a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -21,6 +21,7 @@ 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.hybridcompute.fluent.NetworkProfilesClient; import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner; import reactor.core.publisher.Mono; @@ -54,14 +55,14 @@ public final class NetworkProfilesClientImpl implements NetworkProfilesClient { * The interface defining all the services for HybridComputeManagementClientNetworkProfiles to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientNetworkProfiles") public interface NetworkProfilesService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/networkProfile") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, @HeaderParam("Accept") String accept, Context context); @@ -70,7 +71,7 @@ Mono> get(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/networkProfile") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, @HeaderParam("Accept") String accept, Context context); @@ -89,6 +90,21 @@ Response getSync(@HostParam("endpoint") String endpoint, */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String machineName) { + 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 (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -125,6 +141,24 @@ private Mono getAsync(String resourceGroupName, String mach @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String machineName, 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, machineName, accept, context); @@ -144,4 +178,6 @@ public Response getWithResponse(String resourceGroupName, S public NetworkProfileInner get(String resourceGroupName, String machineName) { return getWithResponse(resourceGroupName, machineName, Context.NONE).getValue(); } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkProfilesClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesImpl.java index c06e85267ab6..7ccfb735b7f6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -29,8 +29,12 @@ public NetworkProfilesImpl(NetworkProfilesClient innerClient, public Response getWithResponse(String resourceGroupName, String machineName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, machineName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkProfileImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkProfileImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public NetworkProfile get(String resourceGroupName, String machineName) { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationImpl.java index f004ec667d4d..3deaa4a4bf46 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationImpl.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkSecurityPerimeterConfigurationInner; import com.azure.resourcemanager.hybridcompute.models.NetworkSecurityPerimeter; import com.azure.resourcemanager.hybridcompute.models.NetworkSecurityPerimeterConfiguration; @@ -37,10 +36,6 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public String provisioningState() { return this.innerModel().provisioningState(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationReconcileResultImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationReconcileResultImpl.java index 76e5eec19248..4cff3da35a3e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationReconcileResultImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationReconcileResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java index e7373a775b10..fc9caaa14771 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -28,12 +28,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.hybridcompute.fluent.NetworkSecurityPerimeterConfigurationsClient; import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkSecurityPerimeterConfigurationInner; import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkSecurityPerimeterConfigurationReconcileResultInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.NetworkSecurityPerimeterConfigurationListResult; +import com.azure.resourcemanager.hybridcompute.models.NetworkSecurityPerimeterConfigurationListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -69,7 +70,7 @@ public final class NetworkSecurityPerimeterConfigurationsClientImpl * The interface defining all the services for HybridComputeManagementClientNetworkSecurityPerimeterConfigurations * to be used by the proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientNetworkSecurityPerimeterConfigurations") public interface NetworkSecurityPerimeterConfigurationsService { @Headers({ "Content-Type: application/json" }) @@ -77,65 +78,65 @@ public interface NetworkSecurityPerimeterConfigurationsService { @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByPrivateLinkScope( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @PathParam("perimeterName") String perimeterName, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("perimeterName") String perimeterName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/networkSecurityPerimeterConfigurations/{perimeterName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response getByPrivateLinkScopeSync( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @PathParam("perimeterName") String perimeterName, @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("perimeterName") String perimeterName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/networkSecurityPerimeterConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPrivateLinkScope( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/networkSecurityPerimeterConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByPrivateLinkScopeSync( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @HeaderParam("Accept") String accept, Context context); + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/networkSecurityPerimeterConfigurations/{perimeterName}/reconcile") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reconcileForPrivateLinkScope(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @PathParam("perimeterName") String perimeterName, @HeaderParam("Accept") String accept, Context context); + Mono>> reconcileForPrivateLinkScope(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("perimeterName") String perimeterName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/networkSecurityPerimeterConfigurations/{perimeterName}/reconcile") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response reconcileForPrivateLinkScopeSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @PathParam("perimeterName") String perimeterName, @HeaderParam("Accept") String accept, Context context); + Response reconcileForPrivateLinkScopeSync(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("perimeterName") String perimeterName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPrivateLinkScopeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -143,7 +144,7 @@ Mono> listByPrivateLin @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByPrivateLinkScopeNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -163,11 +164,29 @@ Response listByPrivateLinkScope @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByPrivateLinkScopeWithResponseAsync(String resourceGroupName, String scopeName, String perimeterName) { + 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 (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (perimeterName == null) { + return Mono.error(new IllegalArgumentException("Parameter perimeterName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.getByPrivateLinkScope(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, perimeterName, accept, context)) + context -> service.getByPrivateLinkScope(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, perimeterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -207,9 +226,31 @@ private Mono getByPrivateLinkScopeAs @ServiceMethod(returns = ReturnType.SINGLE) public Response getByPrivateLinkScopeWithResponse( String resourceGroupName, String scopeName, String perimeterName, 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (perimeterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter perimeterName is required and cannot be null.")); + } final String accept = "application/json"; - return service.getByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, perimeterName, accept, context); + return service.getByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, perimeterName, accept, context); } /** @@ -238,17 +279,32 @@ public NetworkSecurityPerimeterConfigurationInner getByPrivateLinkScope(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 response of a NetworkSecurityPerimeterConfiguration list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of network security perimeter configurations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPrivateLinkScopeSinglePageAsync(String resourceGroupName, String scopeName) { + 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 (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByPrivateLinkScope(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, context)) + context -> service.listByPrivateLinkScope(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, accept, context)) .>map( res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) @@ -263,8 +319,7 @@ public NetworkSecurityPerimeterConfigurationInner getByPrivateLinkScope(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 response of a NetworkSecurityPerimeterConfiguration list operation as paginated response with - * {@link PagedFlux}. + * @return a list of network security perimeter configurations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByPrivateLinkScopeAsync(String resourceGroupName, @@ -281,15 +336,33 @@ private PagedFlux listByPrivateLinkS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NetworkSecurityPerimeterConfiguration list operation along with {@link PagedResponse}. + * @return a list of network security perimeter configurations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeSinglePage(String resourceGroupName, String scopeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } final String accept = "application/json"; Response res - = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, Context.NONE); + = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -303,15 +376,33 @@ private PagedFlux listByPrivateLinkS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NetworkSecurityPerimeterConfiguration list operation along with {@link PagedResponse}. + * @return a list of network security perimeter configurations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeSinglePage(String resourceGroupName, String scopeName, 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } final String accept = "application/json"; Response res - = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, context); + = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -324,8 +415,7 @@ private PagedFlux listByPrivateLinkS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NetworkSecurityPerimeterConfiguration list operation as paginated response with - * {@link PagedIterable}. + * @return a list of network security perimeter configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByPrivateLinkScope(String resourceGroupName, @@ -343,8 +433,7 @@ public PagedIterable listByPrivateLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NetworkSecurityPerimeterConfiguration list operation as paginated response with - * {@link PagedIterable}. + * @return a list of network security perimeter configurations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByPrivateLinkScope(String resourceGroupName, @@ -363,16 +452,35 @@ public PagedIterable listByPrivateLi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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} on successful completion of {@link Mono}. + * @return result of network security perimeter configurations along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> reconcileForPrivateLinkScopeWithResponseAsync(String resourceGroupName, String scopeName, String perimeterName) { + 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 (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (perimeterName == null) { + return Mono.error(new IllegalArgumentException("Parameter perimeterName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.reconcileForPrivateLinkScope(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, perimeterName, accept, context)) + .withContext(context -> service.reconcileForPrivateLinkScope(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), scopeName, + perimeterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -386,14 +494,36 @@ private Mono>> reconcileForPrivateLinkScopeWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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}. + * @return result of network security perimeter configurations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response reconcileForPrivateLinkScopeWithResponse(String resourceGroupName, String scopeName, String perimeterName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (perimeterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter perimeterName is required and cannot be null.")); + } final String accept = "application/json"; - return service.reconcileForPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, perimeterName, accept, Context.NONE); + return service.reconcileForPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, perimeterName, accept, Context.NONE); } /** @@ -407,14 +537,36 @@ private Response reconcileForPrivateLinkScopeWithResponse(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 response body along with {@link Response}. + * @return result of network security perimeter configurations along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Response reconcileForPrivateLinkScopeWithResponse(String resourceGroupName, String scopeName, String perimeterName, 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (perimeterName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter perimeterName is required and cannot be null.")); + } final String accept = "application/json"; - return service.reconcileForPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, perimeterName, accept, context); + return service.reconcileForPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, perimeterName, accept, context); } /** @@ -427,7 +579,7 @@ private Response reconcileForPrivateLinkScopeWithResponse(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 long-running operation. + * @return the {@link PollerFlux} for polling of result of network security perimeter configurations. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private @@ -451,7 +603,7 @@ private Response reconcileForPrivateLinkScopeWithResponse(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 long-running operation. + * @return the {@link SyncPoller} for polling of result of network security perimeter configurations. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public @@ -476,7 +628,7 @@ private Response reconcileForPrivateLinkScopeWithResponse(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 long-running operation. + * @return the {@link SyncPoller} for polling of result of network security perimeter configurations. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public @@ -501,7 +653,7 @@ private Response reconcileForPrivateLinkScopeWithResponse(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 response body on successful completion of {@link Mono}. + * @return result of network security perimeter configurations on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono @@ -520,7 +672,7 @@ private Response reconcileForPrivateLinkScopeWithResponse(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 response. + * @return result of network security perimeter configurations. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkSecurityPerimeterConfigurationReconcileResultInner @@ -539,7 +691,7 @@ private Response reconcileForPrivateLinkScopeWithResponse(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 response. + * @return result of network security perimeter configurations. */ @ServiceMethod(returns = ReturnType.SINGLE) public NetworkSecurityPerimeterConfigurationReconcileResultInner reconcileForPrivateLinkScope( @@ -554,12 +706,19 @@ public NetworkSecurityPerimeterConfigurationReconcileResultInner reconcileForPri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NetworkSecurityPerimeterConfiguration list operation along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return a list of network security perimeter configurations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPrivateLinkScopeNextSinglePageAsync(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( @@ -577,11 +736,20 @@ public NetworkSecurityPerimeterConfigurationReconcileResultInner reconcileForPri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NetworkSecurityPerimeterConfiguration list operation along with {@link PagedResponse}. + * @return a list of network security perimeter configurations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeNextSinglePage(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.listByPrivateLinkScopeNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -597,15 +765,26 @@ public NetworkSecurityPerimeterConfigurationReconcileResultInner reconcileForPri * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NetworkSecurityPerimeterConfiguration list operation along with {@link PagedResponse}. + * @return a list of network security perimeter configurations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeNextSinglePage(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.listByPrivateLinkScopeNextSync(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(NetworkSecurityPerimeterConfigurationsClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsImpl.java index 728b109569a4..e2fe9dbd4546 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -33,8 +33,12 @@ public Response getByPrivateLinkScopeWith String scopeName, String perimeterName, Context context) { Response inner = this.serviceClient() .getByPrivateLinkScopeWithResponse(resourceGroupName, scopeName, perimeterName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new NetworkSecurityPerimeterConfigurationImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkSecurityPerimeterConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public NetworkSecurityPerimeterConfiguration getByPrivateLinkScope(String resourceGroupName, String scopeName, diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationValueImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationValueImpl.java index 63bb2210c334..9fe0529a8bea 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationValueImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationValueImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java index a05dd07c44b9..3d682d6f7135 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -10,7 +10,6 @@ import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -25,9 +24,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridcompute.fluent.OperationsClient; import com.azure.resourcemanager.hybridcompute.fluent.models.OperationValueInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.OperationListResult; +import com.azure.resourcemanager.hybridcompute.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,36 +59,22 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for HybridComputeManagementClientOperations to be used by the proxy * service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.HybridCompute/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.HybridCompute/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, + Response listSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -101,12 +87,16 @@ Response listNextSync(@PathParam(value = "nextLink", encode */ @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( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -119,7 +109,7 @@ private Mono> listSinglePageAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync()); } /** @@ -131,11 +121,16 @@ 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.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + null, null); } /** @@ -149,11 +144,16 @@ 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.")); + } final String accept = "application/json"; Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + null, null); } /** @@ -165,7 +165,7 @@ private PagedResponse listSinglePage(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + return new PagedIterable<>(() -> listSinglePage()); } /** @@ -179,61 +179,8 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of hybrid compute operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return new PagedIterable<>(() -> listSinglePage(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 hybrid compute operations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { - final String accept = "application/json"; - Response res - = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of hybrid compute operations along with {@link PagedResponse}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { - final String accept = "application/json"; - Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } + private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsImpl.java index 599d5f957236..29951ad3666e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionImpl.java index 4dd6f7581739..fc4d7778a736 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsClientImpl.java index 03a876eeda93..074195eb176e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -30,11 +30,12 @@ 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.hybridcompute.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -68,16 +69,17 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * The interface defining all the services for HybridComputeManagementClientPrivateEndpointConnections to be used by * the proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @@ -85,75 +87,83 @@ Mono> get(@HostParam("endpoint") String @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, + Response getSync(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, Context context); + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response createOrUpdateSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, + Response createOrUpdateSync(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, Context context); + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 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("scopeName") String scopeName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + Response deleteSync(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByPrivateLinkScope( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + Mono> listByPrivateLinkScope(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByPrivateLinkScopeSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @HeaderParam("Accept") String accept, Context context); + Response listByPrivateLinkScopeSync(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPrivateLinkScopeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -161,7 +171,7 @@ Mono> listByPrivateLinkScopeNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByPrivateLinkScopeNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -179,11 +189,30 @@ Response listByPrivateLinkScopeNextSync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String scopeName, String privateEndpointConnectionName) { + 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 (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, privateEndpointConnectionName, accept, - context)) + .withContext( + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -220,9 +249,32 @@ private Mono getAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, scopeName, privateEndpointConnectionName, accept, context); + return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, accept, context); } /** @@ -257,12 +309,35 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String scope @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String scopeName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - final String contentType = "application/json"; + 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 (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, privateEndpointConnectionName, - contentType, accept, parameters, context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, privateEndpointConnectionName, parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -281,11 +356,38 @@ private Mono>> createOrUpdateWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String scopeName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, privateEndpointConnectionName, contentType, - accept, parameters, Context.NONE); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, parameters, accept, Context.NONE); } /** @@ -304,11 +406,38 @@ private Response createOrUpdateWithResponse(String resourceGroupName @ServiceMethod(returns = ReturnType.SINGLE) private Response createOrUpdateWithResponse(String resourceGroupName, String scopeName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, privateEndpointConnectionName, contentType, - accept, parameters, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, parameters, accept, context); } /** @@ -451,9 +580,30 @@ public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, S @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String scopeName, String privateEndpointConnectionName) { + 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 (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, privateEndpointConnectionName, context)) + .withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -471,8 +621,32 @@ private Mono>> deleteWithResponseAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String scopeName, String privateEndpointConnectionName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, privateEndpointConnectionName, Context.NONE); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, accept, Context.NONE); } /** @@ -490,8 +664,32 @@ private Response deleteWithResponse(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Response deleteWithResponse(String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, privateEndpointConnectionName, 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, accept, context); } /** @@ -615,11 +813,26 @@ public void delete(String resourceGroupName, String scopeName, String privateEnd @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPrivateLinkScopeSinglePageAsync(String resourceGroupName, String scopeName) { + 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 (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByPrivateLinkScope(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, context)) + context -> service.listByPrivateLinkScope(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, 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())); @@ -655,10 +868,28 @@ private PagedFlux listByPrivateLinkScopeAsync(St @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeSinglePage(String resourceGroupName, String scopeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } final String accept = "application/json"; Response res - = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, Context.NONE); + = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -677,10 +908,28 @@ private PagedResponse listByPrivateLinkScopeSing @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeSinglePage(String resourceGroupName, String scopeName, 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } final String accept = "application/json"; Response res - = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, context); + = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -729,12 +978,19 @@ public PagedIterable listByPrivateLinkScope(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 all private endpoint connections on a private link scope along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPrivateLinkScopeNextSinglePageAsync(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( @@ -751,10 +1007,19 @@ public PagedIterable listByPrivateLinkScope(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 all private endpoint connections on a private link scope along with {@link PagedResponse}. + * @return a list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeNextSinglePage(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.listByPrivateLinkScopeNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -770,15 +1035,26 @@ private PagedResponse listByPrivateLinkScopeNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a private link scope along with {@link PagedResponse}. + * @return a list of private endpoint connections along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeNextSinglePage(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.listByPrivateLinkScopeNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsImpl.java index 9c6b65c25e92..2c344447fa10 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -31,8 +31,12 @@ public Response getWithResponse(String resourceGroupN String privateEndpointConnectionName, Context context) { Response inner = this.serviceClient() .getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public PrivateEndpointConnection get(String resourceGroupName, String scopeName, diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourceImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourceImpl.java index 34ec42ae51cd..33f1511d5ac3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourceImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourceImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesClientImpl.java index f7b4ee71db31..d16bc06fd4d5 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -25,9 +25,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.hybridcompute.models.PrivateLinkResourceListResult; import reactor.core.publisher.Mono; /** @@ -59,43 +60,45 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * The interface defining all the services for HybridComputeManagementClientPrivateLinkResources to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientPrivateLinkResources") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); + Mono> listByPrivateLinkScope(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); + Response listByPrivateLinkScopeSync(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByPrivateLinkScope(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByPrivateLinkScopeSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, + Response getSync(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("groupName") String groupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -103,7 +106,7 @@ Response listByPrivateLinkScopeSync(@HostParam("e @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPrivateLinkScopeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -111,7 +114,7 @@ Mono> listByPrivateLinkScopeNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Response listByPrivateLinkScopeNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -120,20 +123,37 @@ Response listByPrivateLinkScopeNextSync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param groupName The name of the private link 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 private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link Response} on successful completion of {@link Mono}. + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String scopeName, - String groupName) { + private Mono> + listByPrivateLinkScopeSinglePageAsync(String resourceGroupName, String scopeName) { + 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 (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName 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, scopeName, groupName, accept, context)) + .withContext( + context -> service.listByPrivateLinkScope(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, 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())); } @@ -142,17 +162,17 @@ private Mono> getWithResponseAsync(String res * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param groupName The name of the private link 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 private link resources that need to be created for a Azure Monitor PrivateLinkScope on successful - * completion of {@link Mono}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated + * response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String scopeName, String groupName) { - return getWithResponseAsync(resourceGroupName, scopeName, groupName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByPrivateLinkScopeAsync(String resourceGroupName, + String scopeName) { + return new PagedFlux<>(() -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName), + nextLink -> listByPrivateLinkScopeNextSinglePageAsync(nextLink)); } /** @@ -160,20 +180,39 @@ private Mono getAsync(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param groupName The name of the private link 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link Response}. + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String scopeName, - String groupName, Context context) { + private PagedResponse listByPrivateLinkScopeSinglePage(String resourceGroupName, + String scopeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } final String accept = "application/json"; - return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, scopeName, groupName, accept, context); + Response res + = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -181,15 +220,40 @@ public Response getWithResponse(String resourceGroupNa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param groupName The name of the private link 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner get(String resourceGroupName, String scopeName, String groupName) { - return getWithResponse(resourceGroupName, scopeName, groupName, Context.NONE).getValue(); + private PagedResponse listByPrivateLinkScopeSinglePage(String resourceGroupName, + String scopeName, 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -200,20 +264,13 @@ public PrivateLinkResourceInner get(String resourceGroupName, String scopeName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated + * response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByPrivateLinkScopeSinglePageAsync(String resourceGroupName, String scopeName) { - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByPrivateLinkScope(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, 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.COLLECTION) + public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName) { + return new PagedIterable<>(() -> listByPrivateLinkScopeSinglePage(resourceGroupName, scopeName), + nextLink -> listByPrivateLinkScopeNextSinglePage(nextLink)); } /** @@ -221,17 +278,18 @@ public PrivateLinkResourceInner get(String resourceGroupName, String scopeName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedFlux}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByPrivateLinkScopeAsync(String resourceGroupName, - String scopeName) { - return new PagedFlux<>(() -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName), - nextLink -> listByPrivateLinkScopeNextSinglePageAsync(nextLink)); + public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context) { + return new PagedIterable<>(() -> listByPrivateLinkScopeSinglePage(resourceGroupName, scopeName, context), + nextLink -> listByPrivateLinkScopeNextSinglePage(nextLink, context)); } /** @@ -239,21 +297,39 @@ private PagedFlux listByPrivateLinkScopeAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param groupName The name of the private link 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 private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link PagedResponse}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByPrivateLinkScopeSinglePage(String resourceGroupName, - String scopeName) { + private Mono> getWithResponseAsync(String resourceGroupName, String scopeName, + String groupName) { + 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 (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (groupName == null) { + return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } final String accept = "application/json"; - Response res - = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, groupName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -261,22 +337,17 @@ private PagedResponse listByPrivateLinkScopeSinglePage * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param context The context to associate with this operation. + * @param groupName The name of the private link 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 private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link PagedResponse}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByPrivateLinkScopeSinglePage(String resourceGroupName, - String scopeName, Context context) { - final String accept = "application/json"; - Response res - = service.listByPrivateLinkScopeSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono getAsync(String resourceGroupName, String scopeName, String groupName) { + return getWithResponseAsync(resourceGroupName, scopeName, groupName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -284,16 +355,42 @@ private PagedResponse listByPrivateLinkScopeSinglePage * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param groupName The name of the private link 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName) { - return new PagedIterable<>(() -> listByPrivateLinkScopeSinglePage(resourceGroupName, scopeName), - nextLink -> listByPrivateLinkScopeNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String scopeName, + String groupName, 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (groupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, groupName, accept, context); } /** @@ -301,18 +398,15 @@ public PagedIterable listByPrivateLinkScope(String res * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param context The context to associate with this operation. + * @param groupName The name of the private link 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 private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, - Context context) { - return new PagedIterable<>(() -> listByPrivateLinkScopeSinglePage(resourceGroupName, scopeName, context), - nextLink -> listByPrivateLinkScopeNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner get(String resourceGroupName, String scopeName, String groupName) { + return getWithResponse(resourceGroupName, scopeName, groupName, Context.NONE).getValue(); } /** @@ -322,11 +416,18 @@ public PagedIterable listByPrivateLinkScope(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 private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPrivateLinkScopeNextSinglePageAsync(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( @@ -343,11 +444,19 @@ private Mono> listByPrivateLinkScopeNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link PagedResponse}. + * @return a list of private link resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeNextSinglePage(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.listByPrivateLinkScopeNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); @@ -363,16 +472,26 @@ private PagedResponse listByPrivateLinkScopeNextSingle * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link PagedResponse}. + * @return a list of private link resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) private PagedResponse listByPrivateLinkScopeNextSinglePage(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.listByPrivateLinkScopeNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesImpl.java index 4a55651d827c..0748041ad23a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -27,12 +27,29 @@ public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, this.serviceManager = serviceManager; } + public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName) { + PagedIterable inner + = this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context) { + PagedIterable inner + = this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + public Response getWithResponse(String resourceGroupName, String scopeName, String groupName, Context context) { Response inner = this.serviceClient().getWithResponse(resourceGroupName, scopeName, groupName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkResourceImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public PrivateLinkResource get(String resourceGroupName, String scopeName, String groupName) { @@ -44,19 +61,6 @@ public PrivateLinkResource get(String resourceGroupName, String scopeName, Strin } } - public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName) { - PagedIterable inner - = this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, - Context context) { - PagedIterable inner - = this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - private PrivateLinkResourcesClient serviceClient() { return this.innerClient; } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopeValidationDetailsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopeValidationDetailsImpl.java index a4b87f3ace3a..41d9eb5519a3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopeValidationDetailsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopeValidationDetailsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesClientImpl.java index 80f557cd44de..fe46f53703c0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -31,12 +31,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.hybridcompute.fluent.PrivateLinkScopesClient; import com.azure.resourcemanager.hybridcompute.fluent.models.HybridComputePrivateLinkScopeInner; import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkScopeValidationDetailsInner; -import com.azure.resourcemanager.hybridcompute.implementation.models.HybridComputePrivateLinkScopeListResult; +import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScopeListResult; import com.azure.resourcemanager.hybridcompute.models.TagsResource; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -71,502 +72,617 @@ public final class PrivateLinkScopesClientImpl implements PrivateLinkScopesClien * The interface defining all the services for HybridComputeManagementClientPrivateLinkScopes to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientPrivateLinkScopes") public interface PrivateLinkScopesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getValidationDetailsForMachine( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getValidationDetailsForMachineSync( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + Response listSync(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") @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("scopeName") String scopeName, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") @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("scopeName") String scopeName, + Response getByResourceGroupSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") @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("scopeName") String scopeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HybridComputePrivateLinkScopeInner parameters, Context context); + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, + @BodyParam("application/json") HybridComputePrivateLinkScopeInner parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") @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("scopeName") String scopeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") HybridComputePrivateLinkScopeInner parameters, Context context); + Response createOrUpdateSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, + @BodyParam("application/json") HybridComputePrivateLinkScopeInner parameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateTags(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") TagsResource privateLinkScopeTags, Context context); + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, + @BodyParam("application/json") TagsResource privateLinkScopeTags, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateTagsSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") TagsResource privateLinkScopeTags, Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scopeName") String scopeName, - Context context); - - @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") - @ExpectedResponses({ 200, 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("scopeName") String scopeName, + Response updateTagsSync(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, + @BodyParam("application/json") TagsResource privateLinkScopeTags, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + Mono> getValidationDetails(@HostParam("$host") String endpoint, + @PathParam("location") String location, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + @PathParam("privateLinkScopeId") String privateLinkScopeId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listByResourceGroupSync( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + Response getValidationDetailsSync(@HostParam("$host") String endpoint, + @PathParam("location") String location, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + @PathParam("privateLinkScopeId") String privateLinkScopeId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> getValidationDetailsForMachine( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listSync(@HostParam("endpoint") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Response getValidationDetailsForMachineSync( + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getValidationDetails( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("location") String location, @PathParam("subscriptionId") String subscriptionId, - @PathParam("privateLinkScopeId") String privateLinkScopeId, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Response getValidationDetailsSync( - @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, - @PathParam("location") String location, @PathParam("subscriptionId") String subscriptionId, - @PathParam("privateLinkScopeId") String privateLinkScopeId, @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, + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") 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, + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response listNextSync( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 body along with {@link Response} on successful completion of {@link Mono}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getValidationDetailsForMachineWithResponseAsync(String resourceGroupName, String machineName) { + 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.getValidationDetailsForMachine(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, machineName, accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 body on successful completion of {@link Mono}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of all Azure Arc PrivateLinkScopes within a 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 all Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getValidationDetailsForMachineAsync(String resourceGroupName, - String machineName) { - return getValidationDetailsForMachineWithResponseAsync(resourceGroupName, machineName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + 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); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 the response body along with {@link Response}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response - getValidationDetailsForMachineWithResponse(String resourceGroupName, String machineName, Context context) { + 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"; - return service.getValidationDetailsForMachineSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, accept, context); + Response res = service.listSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @throws ManagementException thrown if 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 Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + } + + /** + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkScopeValidationDetailsInner getValidationDetailsForMachine(String resourceGroupName, - String machineName) { - return getValidationDetailsForMachineWithResponse(resourceGroupName, machineName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** - * Returns a Azure Arc PrivateLinkScope. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Arc PrivateLinkScope 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 an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getByResourceGroupWithResponseAsync(String resourceGroupName, String scopeName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (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.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns a Azure Arc PrivateLinkScope. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Arc PrivateLinkScope 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 an Azure Arc PrivateLinkScope definition on successful completion of {@link Mono}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String scopeName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, scopeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Returns a Azure Arc PrivateLinkScope. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Arc PrivateLinkScope 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 an Azure Arc PrivateLinkScope definition along with {@link Response}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String scopeName, Context context) { + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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"; - return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, accept, context); + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns a Azure Arc PrivateLinkScope. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Arc PrivateLinkScope 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 an Azure Arc PrivateLinkScope definition. + * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HybridComputePrivateLinkScopeInner getByResourceGroup(String resourceGroupName, String scopeName) { - return getByResourceGroupWithResponse(resourceGroupName, scopeName, Context.NONE).getValue(); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String scopeName, HybridComputePrivateLinkScopeInner parameters) { - 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, scopeName, contentType, accept, parameters, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition on successful completion of {@link Mono}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String scopeName, - HybridComputePrivateLinkScopeInner parameters) { - return createOrUpdateWithResponseAsync(resourceGroupName, scopeName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** - * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String scopeName, HybridComputePrivateLinkScopeInner parameters, Context context) { - final String contentType = "application/json"; + private Mono>> deleteWithResponseAsync(String resourceGroupName, String scopeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } final String accept = "application/json"; - return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, contentType, accept, parameters, context); + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), scopeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for - * InstrumentationKey nor AppId in the Put operation. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HybridComputePrivateLinkScopeInner createOrUpdate(String resourceGroupName, String scopeName, - HybridComputePrivateLinkScopeInner parameters) { - return createOrUpdateWithResponse(resourceGroupName, scopeName, parameters, Context.NONE).getValue(); + private Response deleteWithResponse(String resourceGroupName, String scopeName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.deleteSync(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, accept, Context.NONE); } /** - * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of - * {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync(String resourceGroupName, - String scopeName, TagsResource privateLinkScopeTags) { - final String contentType = "application/json"; + private Response deleteWithResponse(String resourceGroupName, String scopeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.updateTags(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, contentType, accept, - privateLinkScopeTags, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.deleteSync(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, accept, context); } /** - * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync(String resourceGroupName, String scopeName, - TagsResource privateLinkScopeTags) { - return updateTagsWithResponseAsync(resourceGroupName, scopeName, privateLinkScopeTags) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String scopeName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, scopeName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse(String resourceGroupName, - String scopeName, TagsResource privateLinkScopeTags, Context context) { - final String contentType = "application/json"; - final String accept = "application/json"; - return service.updateTagsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, contentType, accept, privateLinkScopeTags, - context); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName) { + Response response = deleteWithResponse(resourceGroupName, scopeName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** - * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. + * Deletes a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public HybridComputePrivateLinkScopeInner updateTags(String resourceGroupName, String scopeName, - TagsResource privateLinkScopeTags) { - return updateTagsWithResponse(resourceGroupName, scopeName, privateLinkScopeTags, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName, Context context) { + Response response = deleteWithResponse(resourceGroupName, scopeName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -577,14 +693,11 @@ public HybridComputePrivateLinkScopeInner updateTags(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 Response} on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String scopeName) { - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono deleteAsync(String resourceGroupName, String scopeName) { + return beginDeleteAsync(resourceGroupName, scopeName).last().flatMap(this.client::getLroFinalResultOrError); } /** @@ -595,12 +708,10 @@ 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 response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String scopeName) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, Context.NONE); + public void delete(String resourceGroupName, String scopeName) { + beginDelete(resourceGroupName, scopeName).getFinalResult(); } /** @@ -612,49 +723,67 @@ 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 response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Response deleteWithResponse(String resourceGroupName, String scopeName, Context context) { - return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, scopeName, context); + public void delete(String resourceGroupName, String scopeName, Context context) { + beginDelete(resourceGroupName, scopeName, context).getFinalResult(); } /** - * Deletes a Azure Arc PrivateLinkScope. + * Returns a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope 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. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String scopeName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, scopeName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String scopeName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), scopeName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Azure Arc PrivateLinkScope. + * Returns a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope 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. + * @return an Azure Arc PrivateLinkScope definition on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName) { - Response response = deleteWithResponse(resourceGroupName, scopeName); - return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, + String scopeName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, scopeName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Deletes a Azure Arc PrivateLinkScope. + * Returns a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. @@ -662,269 +791,410 @@ public SyncPoller, Void> beginDelete(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 SyncPoller} for polling of long-running operation. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName, Context context) { - Response response = deleteWithResponse(resourceGroupName, scopeName, context); - return this.client.getLroResult(response, Void.class, Void.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String scopeName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, accept, context); } /** - * Deletes a Azure Arc PrivateLinkScope. + * Returns a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope 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. + * @return an Azure Arc PrivateLinkScope definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String scopeName) { - return beginDeleteAsync(resourceGroupName, scopeName).last().flatMap(this.client::getLroFinalResultOrError); + public HybridComputePrivateLinkScopeInner getByResourceGroup(String resourceGroupName, String scopeName) { + return getByResourceGroupWithResponse(resourceGroupName, scopeName, Context.NONE).getValue(); } /** - * Deletes a Azure Arc PrivateLinkScope. + * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters + * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String scopeName) { - beginDelete(resourceGroupName, scopeName).getFinalResult(); + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String scopeName, HybridComputePrivateLinkScopeInner parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), scopeName, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Azure Arc PrivateLinkScope. + * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param context The context to associate with this operation. + * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters + * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Azure Arc PrivateLinkScope definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String scopeName, Context context) { - beginDelete(resourceGroupName, scopeName, context).getFinalResult(); + private Mono createOrUpdateAsync(String resourceGroupName, String scopeName, + HybridComputePrivateLinkScopeInner parameters) { + return createOrUpdateWithResponseAsync(resourceGroupName, scopeName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters + * PrivateLinkScope. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupSinglePageAsync(String resourceGroupName) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String scopeName, HybridComputePrivateLinkScopeInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.createOrUpdateSync(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, parameters, accept, context); } /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters + * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with - * {@link PagedFlux}. + * @return an Azure Arc PrivateLinkScope definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridComputePrivateLinkScopeInner createOrUpdate(String resourceGroupName, String scopeName, + HybridComputePrivateLinkScopeInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, scopeName, parameters, Context.NONE).getValue(); } /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String scopeName, TagsResource privateLinkScopeTags) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (scopeName == null) { + return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateLinkScopeTags == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateLinkScopeTags is required and cannot be null.")); + } else { + privateLinkScopeTags.validate(); + } final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + return FluxUtil + .withContext( + context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, privateLinkScopeTags, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse}. + * @return an Azure Arc PrivateLinkScope definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, - Context context) { - final String accept = "application/json"; - Response res - = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono updateTagsAsync(String resourceGroupName, String scopeName, + TagsResource privateLinkScopeTags) { + return updateTagsWithResponseAsync(resourceGroupName, scopeName, privateLinkScopeTags) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with - * {@link PagedIterable}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePage(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTagsWithResponse(String resourceGroupName, + String scopeName, TagsResource privateLinkScopeTags, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and 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 (scopeName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); + } + if (privateLinkScopeTags == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateLinkScopeTags is required and cannot be null.")); + } else { + privateLinkScopeTags.validate(); + } + final String accept = "application/json"; + return service.updateTagsSync(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, privateLinkScopeTags, accept, context); } /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with - * {@link PagedIterable}. + * @return an Azure Arc PrivateLinkScope definition. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, - Context context) { - return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridComputePrivateLinkScopeInner updateTags(String resourceGroupName, String scopeName, + TagsResource privateLinkScopeTags) { + return updateTagsWithResponse(resourceGroupName, scopeName, privateLinkScopeTags, Context.NONE).getValue(); } /** - * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * Returns a Azure Arc PrivateLinkScope's validation details. * + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope 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 list of all Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { + private Mono> + getValidationDetailsWithResponseAsync(String location, String privateLinkScopeId) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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 (privateLinkScopeId == null) { + return Mono + .error(new IllegalArgumentException("Parameter privateLinkScopeId 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(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getValidationDetails(this.client.getEndpoint(), location, + this.client.getApiVersion(), this.client.getSubscriptionId(), privateLinkScopeId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets a list of all Azure Arc PrivateLinkScopes within a 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 all Azure Arc PrivateLinkScopes within a subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * Returns a Azure Arc PrivateLinkScope's validation details. * + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope 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 list of all Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage() { - final String accept = "application/json"; - Response res = service.listSync(this.client.getEndpoint(), - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); + private Mono getValidationDetailsAsync(String location, + String privateLinkScopeId) { + return getValidationDetailsWithResponseAsync(location, privateLinkScopeId) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * Returns a Azure Arc PrivateLinkScope's validation details. * + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope 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 a list of all Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listSinglePage(Context context) { + public Response getValidationDetailsWithResponse(String location, + String privateLinkScopeId, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter location is required and 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 (privateLinkScopeId == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateLinkScopeId 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); - return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), - res.getValue().nextLink(), null); - } - - /** - * Gets a list of all Azure Arc PrivateLinkScopes within a 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 all Azure Arc PrivateLinkScopes within a subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); + return service.getValidationDetailsSync(this.client.getEndpoint(), location, this.client.getApiVersion(), + this.client.getSubscriptionId(), privateLinkScopeId, accept, context); } /** - * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * Returns a Azure Arc PrivateLinkScope's validation details. * - * @param context The context to associate with this operation. + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope 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 list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with - * {@link PagedIterable}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkScopeValidationDetailsInner getValidationDetails(String location, String privateLinkScopeId) { + return getValidationDetailsWithResponse(location, privateLinkScopeId, Context.NONE).getValue(); } /** - * Returns a Azure Arc PrivateLinkScope's validation details. + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * - * @param location The name of the Azure region. - * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -932,36 +1202,52 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - getValidationDetailsWithResponseAsync(String location, String privateLinkScopeId) { + getValidationDetailsForMachineWithResponseAsync(String resourceGroupName, String machineName) { + 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 (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getValidationDetails(this.client.getEndpoint(), this.client.getApiVersion(), - location, this.client.getSubscriptionId(), privateLinkScopeId, accept, context)) + .withContext(context -> service.getValidationDetailsForMachine(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, machineName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns a Azure Arc PrivateLinkScope's validation details. + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * - * @param location The name of the Azure region. - * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getValidationDetailsAsync(String location, - String privateLinkScopeId) { - return getValidationDetailsWithResponseAsync(location, privateLinkScopeId) + private Mono getValidationDetailsForMachineAsync(String resourceGroupName, + String machineName) { + return getValidationDetailsForMachineWithResponseAsync(resourceGroupName, machineName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Returns a Azure Arc PrivateLinkScope's validation details. + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * - * @param location The name of the Azure region. - * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details for. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -969,26 +1255,45 @@ private Mono getValidationDetailsAsync(S * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getValidationDetailsWithResponse(String location, - String privateLinkScopeId, Context context) { + public Response + getValidationDetailsForMachineWithResponse(String resourceGroupName, String machineName, 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } final String accept = "application/json"; - return service.getValidationDetailsSync(this.client.getEndpoint(), this.client.getApiVersion(), location, - this.client.getSubscriptionId(), privateLinkScopeId, accept, context); + return service.getValidationDetailsForMachineSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, accept, context); } /** - * Returns a Azure Arc PrivateLinkScope's validation details. + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * - * @param location The name of the Azure region. - * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 PrivateLinkScopeValidationDetailsInner getValidationDetails(String location, String privateLinkScopeId) { - return getValidationDetailsWithResponse(location, privateLinkScopeId, Context.NONE).getValue(); + public PrivateLinkScopeValidationDetailsInner getValidationDetailsForMachine(String resourceGroupName, + String machineName) { + return getValidationDetailsForMachineWithResponse(resourceGroupName, machineName, Context.NONE).getValue(); } /** @@ -998,16 +1303,20 @@ public PrivateLinkScopeValidationDetailsInner getValidationDetails(String locati * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return describes the list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listByResourceGroupNextSinglePageAsync(String nextLink) { + 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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -1020,13 +1329,22 @@ public PrivateLinkScopeValidationDetailsInner getValidationDetails(String locati * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse}. + * @return describes the list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + 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.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1039,14 +1357,22 @@ private PagedResponse listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse}. + * @return describes the list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listByResourceGroupNextSinglePage(String nextLink, - Context context) { + 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.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null); } @@ -1058,13 +1384,23 @@ private PagedResponse listByResourceGroupNex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * @return describes the list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { + private Mono> + listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -1077,13 +1413,22 @@ private Mono> listNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse}. + * @return describes the list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink) { + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } final String accept = "application/json"; Response res - = service.listNextSync(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); } @@ -1096,14 +1441,26 @@ private PagedResponse listNextSinglePage(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 all Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse}. + * @return describes the list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private PagedResponse listNextSinglePage(String nextLink, Context context) { + 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.listNextSync(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); } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkScopesClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesImpl.java index 4af2ec0e9f89..a785131ffed6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -29,49 +29,16 @@ public PrivateLinkScopesImpl(PrivateLinkScopesClient innerClient, this.serviceManager = serviceManager; } - public Response - getValidationDetailsForMachineWithResponse(String resourceGroupName, String machineName, Context context) { - Response inner - = this.serviceClient().getValidationDetailsForMachineWithResponse(resourceGroupName, machineName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkScopeValidationDetailsImpl(inner.getValue(), this.manager())); - } - - public PrivateLinkScopeValidationDetails getValidationDetailsForMachine(String resourceGroupName, - String machineName) { - PrivateLinkScopeValidationDetailsInner inner - = this.serviceClient().getValidationDetailsForMachine(resourceGroupName, machineName); - if (inner != null) { - return new PrivateLinkScopeValidationDetailsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String scopeName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, scopeName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new HybridComputePrivateLinkScopeImpl(inner.getValue(), this.manager())); - } - - public HybridComputePrivateLinkScope getByResourceGroup(String resourceGroupName, String scopeName) { - HybridComputePrivateLinkScopeInner inner - = this.serviceClient().getByResourceGroup(resourceGroupName, scopeName); - if (inner != null) { - return new HybridComputePrivateLinkScopeImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String scopeName) { - this.serviceClient().delete(resourceGroupName, scopeName); + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); } - public void delete(String resourceGroupName, String scopeName, Context context) { - this.serviceClient().delete(resourceGroupName, scopeName, context); + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -88,24 +55,46 @@ public PagedIterable listByResourceGroup(String r inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); + public void deleteByResourceGroup(String resourceGroupName, String scopeName) { + this.serviceClient().delete(resourceGroupName, scopeName); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); + public void delete(String resourceGroupName, String scopeName, Context context) { + this.serviceClient().delete(resourceGroupName, scopeName, context); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String scopeName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, scopeName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new HybridComputePrivateLinkScopeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HybridComputePrivateLinkScope getByResourceGroup(String resourceGroupName, String scopeName) { + HybridComputePrivateLinkScopeInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, scopeName); + if (inner != null) { + return new HybridComputePrivateLinkScopeImpl(inner, this.manager()); + } else { + return null; + } } public Response getValidationDetailsWithResponse(String location, String privateLinkScopeId, Context context) { Response inner = this.serviceClient().getValidationDetailsWithResponse(location, privateLinkScopeId, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PrivateLinkScopeValidationDetailsImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkScopeValidationDetailsImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public PrivateLinkScopeValidationDetails getValidationDetails(String location, String privateLinkScopeId) { @@ -118,6 +107,29 @@ public PrivateLinkScopeValidationDetails getValidationDetails(String location, S } } + public Response + getValidationDetailsForMachineWithResponse(String resourceGroupName, String machineName, Context context) { + Response inner + = this.serviceClient().getValidationDetailsForMachineWithResponse(resourceGroupName, machineName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkScopeValidationDetailsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateLinkScopeValidationDetails getValidationDetailsForMachine(String resourceGroupName, + String machineName) { + PrivateLinkScopeValidationDetailsInner inner + = this.serviceClient().getValidationDetailsForMachine(resourceGroupName, machineName); + if (inner != null) { + return new PrivateLinkScopeValidationDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + public HybridComputePrivateLinkScope getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceManagerUtils.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceManagerUtils.java index 23379570dd01..98e67dd0e156 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceManagerUtils.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersClientImpl.java index 9d733063871d..508a3311bd57 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -24,6 +24,7 @@ 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.hybridcompute.fluent.ResourceProvidersClient; @@ -62,46 +63,48 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien * The interface defining all the services for HybridComputeManagementClientResourceProviders to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientResourceProviders") public interface ResourceProvidersService { - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgradeExtensions(@HostParam("endpoint") String endpoint, + Mono>> upgradeExtensions(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @HeaderParam("Content-Type") String contentType, - @BodyParam("application/json") MachineExtensionUpgrade extensionUpgradeParameters, Context context); + @BodyParam("application/json") MachineExtensionUpgrade extensionUpgradeParameters, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Accept: application/json;q=0.9" }) + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response upgradeExtensionsSync(@HostParam("endpoint") String endpoint, + Response upgradeExtensionsSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @HeaderParam("Content-Type") String contentType, - @BodyParam("application/json") MachineExtensionUpgrade extensionUpgradeParameters, Context context); + @BodyParam("application/json") MachineExtensionUpgrade extensionUpgradeParameters, + @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/addExtensions") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> setupExtensions(@HostParam("endpoint") String endpoint, + Mono>> setupExtensions(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SetupExtensionRequestInner extensions, Context context); + @BodyParam("application/json") SetupExtensionRequestInner extensions, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/addExtensions") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response setupExtensionsSync(@HostParam("endpoint") String endpoint, + Response setupExtensionsSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SetupExtensionRequestInner extensions, Context context); + @BodyParam("application/json") SetupExtensionRequestInner extensions, @HeaderParam("Accept") String accept, + Context context); } /** @@ -118,11 +121,32 @@ Response setupExtensionsSync(@HostParam("endpoint") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> upgradeExtensionsWithResponseAsync(String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters) { - final String contentType = "application/json"; + 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 (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionUpgradeParameters == null) { + return Mono.error( + new IllegalArgumentException("Parameter extensionUpgradeParameters is required and cannot be null.")); + } else { + extensionUpgradeParameters.validate(); + } + final String accept = "application/json"; return FluxUtil .withContext(context -> service.upgradeExtensions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, contentType, - extensionUpgradeParameters, context)) + this.client.getSubscriptionId(), resourceGroupName, machineName, extensionUpgradeParameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -140,9 +164,34 @@ private Mono>> upgradeExtensionsWithResponseAsync(Stri @ServiceMethod(returns = ReturnType.SINGLE) private Response upgradeExtensionsWithResponse(String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionUpgradeParameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter extensionUpgradeParameters is required and cannot be null.")); + } else { + extensionUpgradeParameters.validate(); + } + final String accept = "application/json"; return service.upgradeExtensionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, contentType, extensionUpgradeParameters, + this.client.getSubscriptionId(), resourceGroupName, machineName, extensionUpgradeParameters, accept, Context.NONE); } @@ -161,9 +210,34 @@ private Response upgradeExtensionsWithResponse(String resourceGroupN @ServiceMethod(returns = ReturnType.SINGLE) private Response upgradeExtensionsWithResponse(String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensionUpgradeParameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter extensionUpgradeParameters is required and cannot be null.")); + } else { + extensionUpgradeParameters.validate(); + } + final String accept = "application/json"; return service.upgradeExtensionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, contentType, extensionUpgradeParameters, + this.client.getSubscriptionId(), resourceGroupName, machineName, extensionUpgradeParameters, accept, context); } @@ -291,12 +365,30 @@ public void upgradeExtensions(String resourceGroupName, String machineName, @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> setupExtensionsWithResponseAsync(String resourceGroupName, String machineName, SetupExtensionRequestInner extensions) { - final String contentType = "application/json"; + 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 (machineName == null) { + return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensions == null) { + return Mono.error(new IllegalArgumentException("Parameter extensions is required and cannot be null.")); + } else { + extensions.validate(); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.setupExtensions(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, contentType, accept, extensions, - context)) + this.client.getSubscriptionId(), resourceGroupName, machineName, extensions, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -314,11 +406,33 @@ private Mono>> setupExtensionsWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Response setupExtensionsWithResponse(String resourceGroupName, String machineName, SetupExtensionRequestInner extensions) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensions == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensions is required and cannot be null.")); + } else { + extensions.validate(); + } final String accept = "application/json"; return service.setupExtensionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, contentType, accept, extensions, - Context.NONE); + this.client.getSubscriptionId(), resourceGroupName, machineName, extensions, accept, Context.NONE); } /** @@ -336,10 +450,33 @@ private Response setupExtensionsWithResponse(String resourceGroupNam @ServiceMethod(returns = ReturnType.SINGLE) private Response setupExtensionsWithResponse(String resourceGroupName, String machineName, SetupExtensionRequestInner extensions, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (machineName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); + } + if (extensions == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter extensions is required and cannot be null.")); + } else { + extensions.validate(); + } final String accept = "application/json"; return service.setupExtensionsSync(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, machineName, contentType, accept, extensions, context); + this.client.getSubscriptionId(), resourceGroupName, machineName, extensions, accept, context); } /** @@ -455,4 +592,6 @@ public SetupExtensionRequestInner setupExtensions(String resourceGroupName, Stri SetupExtensionRequestInner extensions, Context context) { return beginSetupExtensions(resourceGroupName, machineName, extensions, context).getFinalResult(); } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersImpl.java index e2790b0d32ad..6cf214f8bd9d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsImpl.java index b210b11b9bf8..cd9cab46394a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsClientImpl.java index 606934a28e2e..4b345cbfecfe 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -24,6 +24,7 @@ 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.hybridcompute.fluent.SettingsOperationsClient; import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; import reactor.core.publisher.Mono; @@ -57,14 +58,14 @@ public final class SettingsOperationsClientImpl implements SettingsOperationsCli * The interface defining all the services for HybridComputeManagementClientSettingsOperations to be used by the * proxy service to perform REST calls. */ - @Host("{endpoint}") + @Host("{$host}") @ServiceInterface(name = "HybridComputeManagementClientSettingsOperations") public interface SettingsOperationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("endpoint") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("baseProvider") String baseProvider, @PathParam("baseResourceType") String baseResourceType, @@ -76,7 +77,7 @@ Mono> get(@HostParam("endpoint") String endpoint, @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response getSync(@HostParam("endpoint") String endpoint, + Response getSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("baseProvider") String baseProvider, @PathParam("baseResourceType") String baseResourceType, @@ -84,53 +85,57 @@ Response getSync(@HostParam("endpoint") String endpoint, @PathParam("settingsResourceName") String settingsResourceName, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("endpoint") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("baseProvider") String baseProvider, @PathParam("baseResourceType") String baseResourceType, @PathParam("baseResourceName") String baseResourceName, @PathParam("settingsResourceName") String settingsResourceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SettingsInner parameters, Context context); + @BodyParam("application/json") SettingsInner parameters, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response updateSync(@HostParam("endpoint") String endpoint, + Response updateSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("baseProvider") String baseProvider, @PathParam("baseResourceType") String baseResourceType, @PathParam("baseResourceName") String baseResourceName, @PathParam("settingsResourceName") String settingsResourceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SettingsInner parameters, Context context); + @BodyParam("application/json") SettingsInner parameters, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> patch(@HostParam("endpoint") String endpoint, + Mono> patch(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("baseProvider") String baseProvider, @PathParam("baseResourceType") String baseResourceType, @PathParam("baseResourceName") String baseResourceName, @PathParam("settingsResourceName") String settingsResourceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SettingsInner parameters, Context context); + @BodyParam("application/json") SettingsInner parameters, @HeaderParam("Accept") String accept, + Context context); + @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{baseProvider}/{baseResourceType}/{baseResourceName}/providers/Microsoft.HybridCompute/settings/{settingsResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Response patchSync(@HostParam("endpoint") String endpoint, + Response patchSync(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("baseProvider") String baseProvider, @PathParam("baseResourceType") String baseResourceType, @PathParam("baseResourceName") String baseResourceName, @PathParam("settingsResourceName") String settingsResourceName, - @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SettingsInner parameters, Context context); + @BodyParam("application/json") SettingsInner parameters, @HeaderParam("Accept") String accept, + Context context); } /** @@ -144,12 +149,38 @@ Response patchSync(@HostParam("endpoint") String endpoint, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName) { + 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 (baseProvider == null) { + return Mono.error(new IllegalArgumentException("Parameter baseProvider is required and cannot be null.")); + } + if (baseResourceType == null) { + return Mono + .error(new IllegalArgumentException("Parameter baseResourceType is required and cannot be null.")); + } + if (baseResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter baseResourceName is required and cannot be null.")); + } + if (settingsResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -169,8 +200,7 @@ private Mono> getWithResponseAsync(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 concrete proxy resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String baseProvider, String baseResourceType, @@ -191,12 +221,41 @@ private Mono getAsync(String resourceGroupName, String baseProvid * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, 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 (baseProvider == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter baseProvider is required and cannot be null.")); + } + if (baseResourceType == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter baseResourceType is required and cannot be null.")); + } + if (baseResourceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter baseResourceName is required and cannot be null.")); + } + if (settingsResourceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); + } final String accept = "application/json"; return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, accept, context); @@ -213,7 +272,7 @@ public Response getWithResponse(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 concrete proxy resource types can be created by aliasing this type using a specific property type. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public SettingsInner get(String resourceGroupName, String baseProvider, String baseResourceType, @@ -234,18 +293,48 @@ public SettingsInner get(String resourceGroupName, String baseProvider, String b * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters) { - final String contentType = "application/json"; + 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 (baseProvider == null) { + return Mono.error(new IllegalArgumentException("Parameter baseProvider is required and cannot be null.")); + } + if (baseResourceType == null) { + return Mono + .error(new IllegalArgumentException("Parameter baseResourceType is required and cannot be null.")); + } + if (baseResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter baseResourceName is required and cannot be null.")); + } + if (settingsResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, baseProvider, baseResourceType, baseResourceName, - settingsResourceName, contentType, accept, parameters, context)) + settingsResourceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -261,8 +350,7 @@ private Mono> updateWithResponseAsync(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 concrete proxy resource types can be created by aliasing this type using a specific property type 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 baseProvider, String baseResourceType, @@ -284,18 +372,52 @@ private Mono updateAsync(String resourceGroupName, String basePro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (baseProvider == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter baseProvider is required and cannot be null.")); + } + if (baseResourceType == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter baseResourceType is required and cannot be null.")); + } + if (baseResourceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter baseResourceName is required and cannot be null.")); + } + if (settingsResourceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, baseProvider, baseResourceType, baseResourceName, - settingsResourceName, contentType, accept, parameters, context); + settingsResourceName, parameters, accept, context); } /** @@ -310,7 +432,7 @@ public Response updateWithResponse(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 concrete proxy resource types can be created by aliasing this type using a specific property type. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public SettingsInner update(String resourceGroupName, String baseProvider, String baseResourceType, @@ -331,18 +453,48 @@ public SettingsInner update(String resourceGroupName, String baseProvider, 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 concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> patchWithResponseAsync(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters) { - final String contentType = "application/json"; + 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 (baseProvider == null) { + return Mono.error(new IllegalArgumentException("Parameter baseProvider is required and cannot be null.")); + } + if (baseResourceType == null) { + return Mono + .error(new IllegalArgumentException("Parameter baseResourceType is required and cannot be null.")); + } + if (baseResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter baseResourceName is required and cannot be null.")); + } + if (settingsResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return FluxUtil .withContext(context -> service.patch(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, baseProvider, baseResourceType, baseResourceName, - settingsResourceName, contentType, accept, parameters, context)) + settingsResourceName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -358,8 +510,7 @@ private Mono> patchWithResponseAsync(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type on - * successful completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono patchAsync(String resourceGroupName, String baseProvider, String baseResourceType, @@ -381,18 +532,52 @@ private Mono patchAsync(String resourceGroupName, String baseProv * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response patchWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context) { - final String contentType = "application/json"; + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and 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 (baseProvider == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter baseProvider is required and cannot be null.")); + } + if (baseResourceType == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter baseResourceType is required and cannot be null.")); + } + if (baseResourceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter baseResourceName is required and cannot be null.")); + } + if (settingsResourceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter settingsResourceName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } final String accept = "application/json"; return service.patchSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, baseProvider, baseResourceType, baseResourceName, - settingsResourceName, contentType, accept, parameters, context); + settingsResourceName, parameters, accept, context); } /** @@ -407,7 +592,7 @@ public Response patchWithResponse(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 concrete proxy resource types can be created by aliasing this type using a specific property type. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public SettingsInner patch(String resourceGroupName, String baseProvider, String baseResourceType, @@ -415,4 +600,6 @@ public SettingsInner patch(String resourceGroupName, String baseProvider, String return patchWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, parameters, Context.NONE).getValue(); } + + private static final ClientLogger LOGGER = new ClientLogger(SettingsOperationsClientImpl.class); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsImpl.java index e5d7d6c384b7..b663f67428d2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; @@ -31,8 +31,12 @@ public Response getWithResponse(String resourceGroupName, String baseP Response inner = this.serviceClient() .getWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SettingsImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public Settings get(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, @@ -51,8 +55,12 @@ public Response updateWithResponse(String resourceGroupName, String ba Response inner = this.serviceClient() .updateWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, parameters, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SettingsImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public Settings update(String resourceGroupName, String baseProvider, String baseResourceType, @@ -72,8 +80,12 @@ public Response patchWithResponse(String resourceGroupName, String bas Response inner = this.serviceClient() .patchWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, parameters, context); - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SettingsImpl(inner.getValue(), this.manager())); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } } public Settings patch(String resourceGroupName, String baseProvider, String baseResourceType, diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SetupExtensionRequestImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SetupExtensionRequestImpl.java index d162d44aa472..3192b62f6b5d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SetupExtensionRequestImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SetupExtensionRequestImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/package-info.java index dffc91937d9d..a34c446310d8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for HybridCompute. - * Azure Arc( Servers and K8s Clusters) API reference for Private Link's Scopes management. + * Package containing the implementations for HybridComputeManagementClient. + * The Hybrid Compute Management Client. */ package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessMode.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessMode.java index 8657e0e85366..970a13c8d903 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessMode.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,17 +12,17 @@ */ public final class AccessMode extends ExpandableStringEnum { /** - * Indicates that resource access is controlled by the NSP definition. + * Static value enforced for AccessMode. */ public static final AccessMode ENFORCED = fromString("enforced"); /** - * Dry run mode, where traffic is evaluated against NSP Rules, logged but not enforced. + * Static value audit for AccessMode. */ public static final AccessMode AUDIT = fromString("audit"); /** - * Enables traffic evaluation to fall back to resource-specific firewall configurations. + * Static value learning for AccessMode. */ public static final AccessMode LEARNING = fromString("learning"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRule.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRule.java index af4cc2488f70..23de396e15bd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRule.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -31,7 +31,7 @@ public final class AccessRule implements JsonSerializable { /** * Creates an instance of AccessRule class. */ - private AccessRule() { + public AccessRule() { } /** @@ -70,6 +70,17 @@ public List addressPrefixes() { return this.innerProperties() == null ? null : this.innerProperties().addressPrefixes(); } + /** + * 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/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRuleDirection.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRuleDirection.java index 07c266f07d8b..490ac993bd84 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRuleDirection.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRuleDirection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class AccessRuleDirection extends ExpandableStringEnum { /** - * Traffic originates outside of network. + * Static value Inbound for AccessRuleDirection. */ public static final AccessRuleDirection INBOUND = fromString("Inbound"); /** - * Traffic originates inside the network. + * Static value Outbound for AccessRuleDirection. */ public static final AccessRuleDirection OUTBOUND = fromString("Outbound"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfiguration.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfiguration.java index 69789d80a966..09c91ab7d20a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfiguration.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -61,7 +61,7 @@ public final class AgentConfiguration implements JsonSerializable e.validate()); + } + if (extensionsBlockList() != null) { + extensionsBlockList().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfigurationMode.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfigurationMode.java index 0df23e4bcc85..b105610222e0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfigurationMode.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfigurationMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -13,12 +13,12 @@ */ public final class AgentConfigurationMode extends ExpandableStringEnum { /** - * full. + * Static value full for AgentConfigurationMode. */ public static final AgentConfigurationMode FULL = fromString("full"); /** - * monitor. + * Static value monitor for AgentConfigurationMode. */ public static final AgentConfigurationMode MONITOR = fromString("monitor"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentUpgrade.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentUpgrade.java index c9369bccd85e..24509dc5d74c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentUpgrade.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentUpgrade.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,6 +12,8 @@ import com.azure.json.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.Objects; +import java.util.UUID; /** * The info w.r.t Agent Upgrade. @@ -26,7 +28,7 @@ public final class AgentUpgrade implements JsonSerializable { /* * The correlation ID associated with an agent upgrade operation. */ - private String correlationId; + private UUID correlationId; /* * Specifies if the machine's agent should be upgraded @@ -84,7 +86,7 @@ public AgentUpgrade withDesiredVersion(String desiredVersion) { * * @return the correlationId value. */ - public String correlationId() { + public UUID correlationId() { return this.correlationId; } @@ -94,7 +96,7 @@ public String correlationId() { * @param correlationId the correlationId value to set. * @return the AgentUpgrade object itself. */ - public AgentUpgrade withCorrelationId(String correlationId) { + public AgentUpgrade withCorrelationId(UUID correlationId) { this.correlationId = correlationId; return this; } @@ -155,6 +157,14 @@ public String lastAttemptMessage() { return this.lastAttemptMessage; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ @@ -162,7 +172,7 @@ public String lastAttemptMessage() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("desiredVersion", this.desiredVersion); - jsonWriter.writeStringField("correlationId", this.correlationId); + jsonWriter.writeStringField("correlationId", Objects.toString(this.correlationId, null)); jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); return jsonWriter.writeEndObject(); } @@ -185,7 +195,8 @@ public static AgentUpgrade fromJson(JsonReader jsonReader) throws IOException { if ("desiredVersion".equals(fieldName)) { deserializedAgentUpgrade.desiredVersion = reader.getString(); } else if ("correlationId".equals(fieldName)) { - deserializedAgentUpgrade.correlationId = reader.getString(); + deserializedAgentUpgrade.correlationId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("enableAutomaticUpgrade".equals(fieldName)) { deserializedAgentUpgrade.enableAutomaticUpgrade = reader.getNullable(JsonReader::getBoolean); } else if ("lastAttemptDesiredVersion".equals(fieldName)) { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ArcKindEnum.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ArcKindEnum.java index 10b983252831..ab7979379eb0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ArcKindEnum.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ArcKindEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,37 +12,37 @@ */ public final class ArcKindEnum extends ExpandableStringEnum { /** - * AVS. + * Static value AVS for ArcKindEnum. */ public static final ArcKindEnum AVS = fromString("AVS"); /** - * HCI. + * Static value HCI for ArcKindEnum. */ public static final ArcKindEnum HCI = fromString("HCI"); /** - * SCVMM. + * Static value SCVMM for ArcKindEnum. */ public static final ArcKindEnum SCVMM = fromString("SCVMM"); /** - * VMware. + * Static value VMware for ArcKindEnum. */ public static final ArcKindEnum VMWARE = fromString("VMware"); /** - * EPS. + * Static value EPS for ArcKindEnum. */ public static final ArcKindEnum EPS = fromString("EPS"); /** - * GCP. + * Static value GCP for ArcKindEnum. */ public static final ArcKindEnum GCP = fromString("GCP"); /** - * AWS. + * Static value AWS for ArcKindEnum. */ public static final ArcKindEnum AWS = fromString("AWS"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AssessmentModeTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AssessmentModeTypes.java index b63386e6d397..875a0bce436e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AssessmentModeTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AssessmentModeTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class AssessmentModeTypes extends ExpandableStringEnum { /** - * ImageDefault. + * Static value ImageDefault for AssessmentModeTypes. */ public static final AssessmentModeTypes IMAGE_DEFAULT = fromString("ImageDefault"); /** - * AutomaticByPlatform. + * Static value AutomaticByPlatform for AssessmentModeTypes. */ public static final AssessmentModeTypes AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AvailablePatchCountByClassification.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AvailablePatchCountByClassification.java index a23a5a2d1a24..b2d325bc36c3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AvailablePatchCountByClassification.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AvailablePatchCountByClassification.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -65,7 +65,7 @@ public final class AvailablePatchCountByClassification /** * Creates an instance of AvailablePatchCountByClassification class. */ - private AvailablePatchCountByClassification() { + public AvailablePatchCountByClassification() { } /** @@ -149,6 +149,14 @@ public Integer other() { return this.other; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/CloudMetadata.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/CloudMetadata.java index 2a7418a74261..511df5ab0cba 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/CloudMetadata.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/CloudMetadata.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -36,6 +36,14 @@ public String provider() { return this.provider; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConfigurationExtension.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConfigurationExtension.java index 2d25382142d6..c044c706ede4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConfigurationExtension.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConfigurationExtension.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -29,7 +29,7 @@ public final class ConfigurationExtension implements JsonSerializable { /* * The path of the disk. @@ -54,7 +54,7 @@ public final class Disk implements JsonSerializable { /** * Creates an instance of Disk class. */ - private Disk() { + public Disk() { } /** @@ -66,6 +66,17 @@ public String path() { return this.path; } + /** + * Set the path property: The path of the disk. + * + * @param path the path value to set. + * @return the Disk object itself. + */ + public Disk withPath(String path) { + this.path = path; + return this; + } + /** * Get the diskType property: The type of the disk. * @@ -75,6 +86,17 @@ public String diskType() { return this.diskType; } + /** + * Set the diskType property: The type of the disk. + * + * @param diskType the diskType value to set. + * @return the Disk object itself. + */ + public Disk withDiskType(String diskType) { + this.diskType = diskType; + return this; + } + /** * Get the generatedId property: The generated ID of the disk. * @@ -84,6 +106,17 @@ public String generatedId() { return this.generatedId; } + /** + * Set the generatedId property: The generated ID of the disk. + * + * @param generatedId the generatedId value to set. + * @return the Disk object itself. + */ + public Disk withGeneratedId(String generatedId) { + this.generatedId = generatedId; + return this; + } + /** * Get the id property: The ID of the disk. * @@ -93,6 +126,17 @@ public String id() { return this.id; } + /** + * Set the id property: The ID of the disk. + * + * @param id the id value to set. + * @return the Disk object itself. + */ + public Disk withId(String id) { + this.id = id; + return this; + } + /** * Get the name property: The name of the disk. * @@ -102,6 +146,17 @@ public String name() { return this.name; } + /** + * Set the name property: The name of the disk. + * + * @param name the name value to set. + * @return the Disk object itself. + */ + public Disk withName(String name) { + this.name = name; + return this; + } + /** * Get the maxSizeInBytes property: The size of the disk, in bytes. * @@ -111,6 +166,17 @@ public Long maxSizeInBytes() { return this.maxSizeInBytes; } + /** + * Set the maxSizeInBytes property: The size of the disk, in bytes. + * + * @param maxSizeInBytes the maxSizeInBytes value to set. + * @return the Disk object itself. + */ + public Disk withMaxSizeInBytes(Long maxSizeInBytes) { + this.maxSizeInBytes = maxSizeInBytes; + return this; + } + /** * Get the usedSpaceInBytes property: The amount of space used on the disk, in bytes. * @@ -120,6 +186,25 @@ public Long usedSpaceInBytes() { return this.usedSpaceInBytes; } + /** + * Set the usedSpaceInBytes property: The amount of space used on the disk, in bytes. + * + * @param usedSpaceInBytes the usedSpaceInBytes value to set. + * @return the Disk object itself. + */ + public Disk withUsedSpaceInBytes(Long usedSpaceInBytes) { + this.usedSpaceInBytes = usedSpaceInBytes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuEligibility.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuEligibility.java index de93e78f978c..b5e618d700b4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuEligibility.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuEligibility.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,17 +12,17 @@ */ public final class EsuEligibility extends ExpandableStringEnum { /** - * Eligible. + * Static value Eligible for EsuEligibility. */ public static final EsuEligibility ELIGIBLE = fromString("Eligible"); /** - * Ineligible. + * Static value Ineligible for EsuEligibility. */ public static final EsuEligibility INELIGIBLE = fromString("Ineligible"); /** - * Unknown. + * Static value Unknown for EsuEligibility. */ public static final EsuEligibility UNKNOWN = fromString("Unknown"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKey.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKey.java index da8849c4a6fd..1926178d4546 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKey.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKey.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * ESU key. */ -@Immutable +@Fluent public final class EsuKey implements JsonSerializable { /* * SKU number. @@ -30,7 +30,7 @@ public final class EsuKey implements JsonSerializable { /** * Creates an instance of EsuKey class. */ - private EsuKey() { + public EsuKey() { } /** @@ -42,6 +42,17 @@ public String sku() { return this.sku; } + /** + * Set the sku property: SKU number. + * + * @param sku the sku value to set. + * @return the EsuKey object itself. + */ + public EsuKey withSku(String sku) { + this.sku = sku; + return this; + } + /** * Get the licenseStatus property: The current status of the license profile key. Represented by the same integer * value that is presented on the machine itself when querying the license key status. @@ -52,6 +63,26 @@ public Integer licenseStatus() { return this.licenseStatus; } + /** + * Set the licenseStatus property: The current status of the license profile key. Represented by the same integer + * value that is presented on the machine itself when querying the license key status. + * + * @param licenseStatus the licenseStatus value to set. + * @return the EsuKey object itself. + */ + public EsuKey withLicenseStatus(Integer licenseStatus) { + this.licenseStatus = licenseStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKeyState.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKeyState.java index 68fdb3e20857..a297f06eb666 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKeyState.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKeyState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class EsuKeyState extends ExpandableStringEnum { /** - * Inactive. + * Static value Inactive for EsuKeyState. */ public static final EsuKeyState INACTIVE = fromString("Inactive"); /** - * Active. + * Static value Active for EsuKeyState. */ public static final EsuKeyState ACTIVE = fromString("Active"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuServerType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuServerType.java index 0e14a66a29ed..a1dda4822813 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuServerType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuServerType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class EsuServerType extends ExpandableStringEnum { /** - * Standard. + * Static value Standard for EsuServerType. */ public static final EsuServerType STANDARD = fromString("Standard"); /** - * Datacenter. + * Static value Datacenter for EsuServerType. */ public static final EsuServerType DATACENTER = fromString("Datacenter"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExecutionState.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExecutionState.java index 645510599c19..cc9467c9d1ff 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExecutionState.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExecutionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,37 +12,37 @@ */ public final class ExecutionState extends ExpandableStringEnum { /** - * Unknown. + * Static value Unknown for ExecutionState. */ public static final ExecutionState UNKNOWN = fromString("Unknown"); /** - * Pending. + * Static value Pending for ExecutionState. */ public static final ExecutionState PENDING = fromString("Pending"); /** - * Running. + * Static value Running for ExecutionState. */ public static final ExecutionState RUNNING = fromString("Running"); /** - * Failed. + * Static value Failed for ExecutionState. */ public static final ExecutionState FAILED = fromString("Failed"); /** - * Succeeded. + * Static value Succeeded for ExecutionState. */ public static final ExecutionState SUCCEEDED = fromString("Succeeded"); /** - * TimedOut. + * Static value TimedOut for ExecutionState. */ public static final ExecutionState TIMED_OUT = fromString("TimedOut"); /** - * Canceled. + * Static value Canceled for ExecutionState. */ public static final ExecutionState CANCELED = fromString("Canceled"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadataV2s.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadataV2s.java index c0170be8037a..d245913884f3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadataV2s.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadataV2s.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -15,7 +15,7 @@ public interface ExtensionMetadataV2s { /** * Gets an Extension Metadata based on location, publisher, extensionType and version. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param version The version of the Extension being received. @@ -32,7 +32,7 @@ Response getWithResponse(String location, String publisher, St /** * Gets an Extension Metadata based on location, publisher, extensionType and version. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param version The version of the Extension being received. @@ -46,7 +46,7 @@ Response getWithResponse(String location, String publisher, St /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -60,7 +60,7 @@ Response getWithResponse(String location, String publisher, St /** * Gets all Extension versions based on location, publisher, extensionType. * - * @param location The location of the Extension being received. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @param context The context to associate with this operation. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadatas.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadatas.java index 3e434315d701..f92df4b1a786 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadatas.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadatas.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublisher.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublisher.java index b6541945889d..81e0be4e9019 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublisher.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublisher.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionPublisherListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublisherListResult.java similarity index 71% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionPublisherListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublisherListResult.java index 7fe75cae8688..e7ad5159c619 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionPublisherListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublisherListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * The List of Extension Publishers. */ -@Immutable +@Fluent public final class ExtensionPublisherListResult implements JsonSerializable { /* - * The ExtensionPublisher items on this page + * The list of extension publishers. */ private List value; /* - * The link to the next page of items + * The URI to fetch the next page of extension publishers. */ private String nextLink; /** * Creates an instance of ExtensionPublisherListResult class. */ - private ExtensionPublisherListResult() { + public ExtensionPublisherListResult() { } /** - * Get the value property: The ExtensionPublisher items on this page. + * Get the value property: The list of extension publishers. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: The URI to fetch the next page of extension publishers. * * @return the nextLink value. */ @@ -52,6 +52,28 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of extension publishers. + * + * @param nextLink the nextLink value to set. + * @return the ExtensionPublisherListResult object itself. + */ + public ExtensionPublisherListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ @@ -68,7 +90,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExtensionPublisherListResult 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 ExtensionPublisherListResult. */ public static ExtensionPublisherListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublishers.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublishers.java index e479d108f474..8cf99e28ce6e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublishers.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublishers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -14,7 +14,7 @@ public interface ExtensionPublishers { /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,7 +25,7 @@ public interface ExtensionPublishers { /** * Gets all Extension publishers based on the location. * - * @param location The location name. + * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTargetProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTargetProperties.java index 4f250cfb585b..42f3d92f75f7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTargetProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTargetProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -47,6 +47,14 @@ public ExtensionTargetProperties withTargetVersion(String targetVersion) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionType.java index e831956f2257..13f0a49248c6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionTypeListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTypeListResult.java similarity index 71% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionTypeListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTypeListResult.java index 94cd0e26a6d5..c6d87a52d59a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionTypeListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTypeListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * The List of Extension Types. */ -@Immutable +@Fluent public final class ExtensionTypeListResult implements JsonSerializable { /* - * The ExtensionType items on this page + * The list of extension types. */ private List value; /* - * The link to the next page of items + * The URI to fetch the next page of extension types. */ private String nextLink; /** * Creates an instance of ExtensionTypeListResult class. */ - private ExtensionTypeListResult() { + public ExtensionTypeListResult() { } /** - * Get the value property: The ExtensionType items on this page. + * Get the value property: The list of extension types. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: The URI to fetch the next page of extension types. * * @return the nextLink value. */ @@ -52,6 +52,28 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of extension types. + * + * @param nextLink the nextLink value to set. + * @return the ExtensionTypeListResult object itself. + */ + public ExtensionTypeListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ @@ -68,7 +90,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExtensionTypeListResult 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 ExtensionTypeListResult. */ public static ExtensionTypeListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTypes.java index 6c442caac56a..3ec5d3a0e13f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -14,7 +14,7 @@ public interface ExtensionTypes { /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -26,7 +26,7 @@ public interface ExtensionTypes { /** * Gets all Extension types based on location and publisher. * - * @param location The location name. + * @param location The name of Azure region. * @param publisher The publisher of the Extension being received. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValue.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValue.java index f5a2186448dd..39a27495c17e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValue.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValue.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionValueListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResult.java similarity index 80% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionValueListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResult.java index fe6be6c3cc48..190e0e0a7474 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionValueListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -23,15 +23,10 @@ public final class ExtensionValueListResult implements JsonSerializable value; - /* - * The URL to get the next set of results. - */ - private String nextLink; - /** * Creates an instance of ExtensionValueListResult class. */ - private ExtensionValueListResult() { + public ExtensionValueListResult() { } /** @@ -44,12 +39,14 @@ public List value() { } /** - * Get the nextLink property: The URL to get the next set of results. + * Validates the instance. * - * @return the nextLink value. + * @throws IllegalArgumentException thrown if the instance is not valid. */ - public String nextLink() { - return this.nextLink; + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } } /** @@ -80,8 +77,6 @@ public static ExtensionValueListResult fromJson(JsonReader jsonReader) throws IO List value = reader.readArray(reader1 -> ExtensionValueInner.fromJson(reader1)); deserializedExtensionValueListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedExtensionValueListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionValueListResultV2.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResultV2.java similarity index 71% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionValueListResultV2.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResultV2.java index bc0b463ae33c..03350bb440d8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionValueListResultV2.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResultV2.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +16,26 @@ /** * The List Extension Metadata response. */ -@Immutable +@Fluent public final class ExtensionValueListResultV2 implements JsonSerializable { /* - * The ExtensionValueV2 items on this page + * The list of extension metadata. */ private List value; /* - * The link to the next page of items + * The URI to fetch the next page of extension metadata. */ private String nextLink; /** * Creates an instance of ExtensionValueListResultV2 class. */ - private ExtensionValueListResultV2() { + public ExtensionValueListResultV2() { } /** - * Get the value property: The ExtensionValueV2 items on this page. + * Get the value property: The list of extension metadata. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: The URI to fetch the next page of extension metadata. * * @return the nextLink value. */ @@ -52,6 +52,28 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of extension metadata. + * + * @param nextLink the nextLink value to set. + * @return the ExtensionValueListResultV2 object itself. + */ + public ExtensionValueListResultV2 withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ @@ -68,7 +90,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ExtensionValueListResultV2 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 ExtensionValueListResultV2. */ public static ExtensionValueListResultV2 fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueV2.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueV2.java index 77a882d8a981..420a5955684d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueV2.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueV2.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsResourceStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsResourceStatus.java index 3e43a6e9ef56..d1e59a9b2a51 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsResourceStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsResourceStatus.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,7 +17,7 @@ /** * Instance view status. */ -@Immutable +@Fluent public final class ExtensionsResourceStatus implements JsonSerializable { /* * The status code. @@ -47,7 +47,7 @@ public final class ExtensionsResourceStatus implements JsonSerializable /** * Creates an instance of FirmwareProfile class. */ - private FirmwareProfile() { + public FirmwareProfile() { } /** @@ -50,6 +50,14 @@ public String type() { return this.type; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateway.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateway.java index ca09836ee4aa..6da5832be6e3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateway.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateway.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayType.java index 81aa88a75874..0a3a7f5c7d47 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,7 +12,7 @@ */ public final class GatewayType extends ExpandableStringEnum { /** - * Public. + * Static value Public for GatewayType. */ public static final GatewayType PUBLIC = fromString("Public"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayUpdate.java index 89516f6a8ef5..532daa0100e8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -70,6 +70,18 @@ public GatewayUpdate withAllowedFeatures(List allowedFeatures) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateways.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateways.java index c6e66ab8804d..6525e7fe4371 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateways.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateways.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -67,7 +67,7 @@ public interface Gateways { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -79,7 +79,7 @@ public interface Gateways { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -88,7 +88,7 @@ public interface Gateways { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -99,7 +99,7 @@ public interface Gateways { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of Gateway items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/GatewaysListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewaysListResult.java similarity index 59% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/GatewaysListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewaysListResult.java index bd37d614a0e6..aa217fde1d68 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/GatewaysListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewaysListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +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,28 +15,28 @@ import java.util.List; /** - * Paged collection of Gateway items. + * The List license operation response. */ -@Immutable +@Fluent public final class GatewaysListResult implements JsonSerializable { /* - * The Gateway items on this page + * The list of Gateways. */ private List value; /* - * The link to the next page of items + * The URI to fetch the next page of Gateways. Call ListNext() with this URI to fetch the next page of Gateways. */ private String nextLink; /** * Creates an instance of GatewaysListResult class. */ - private GatewaysListResult() { + public GatewaysListResult() { } /** - * Get the value property: The Gateway items on this page. + * Get the value property: The list of Gateways. * * @return the value value. */ @@ -44,7 +45,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: The list of Gateways. + * + * @param value the value value to set. + * @return the GatewaysListResult object itself. + */ + public GatewaysListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of Gateways. Call ListNext() with this URI to fetch the + * next page of Gateways. * * @return the nextLink value. */ @@ -52,6 +65,34 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of Gateways. Call ListNext() with this URI to fetch the + * next page of Gateways. + * + * @param nextLink the nextLink value to set. + * @return the GatewaysListResult object itself. + */ + public GatewaysListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model GatewaysListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(GatewaysListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HardwareProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HardwareProfile.java index 99e103eb4bf3..d133584186ad 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HardwareProfile.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HardwareProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -35,7 +35,7 @@ public final class HardwareProfile implements JsonSerializable /** * Creates an instance of HardwareProfile class. */ - private HardwareProfile() { + public HardwareProfile() { } /** @@ -65,6 +65,17 @@ public List processors() { return this.processors; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (processors() != null) { + processors().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HotpatchEnablementStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HotpatchEnablementStatus.java index 29b3bee22960..7c0d68e42279 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HotpatchEnablementStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HotpatchEnablementStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,27 +12,27 @@ */ public final class HotpatchEnablementStatus extends ExpandableStringEnum { /** - * Unknown. + * Static value Unknown for HotpatchEnablementStatus. */ public static final HotpatchEnablementStatus UNKNOWN = fromString("Unknown"); /** - * PendingEvaluation. + * Static value PendingEvaluation for HotpatchEnablementStatus. */ public static final HotpatchEnablementStatus PENDING_EVALUATION = fromString("PendingEvaluation"); /** - * Disabled. + * Static value Disabled for HotpatchEnablementStatus. */ public static final HotpatchEnablementStatus DISABLED = fromString("Disabled"); /** - * ActionRequired. + * Static value ActionRequired for HotpatchEnablementStatus. */ public static final HotpatchEnablementStatus ACTION_REQUIRED = fromString("ActionRequired"); /** - * Enabled. + * Static value Enabled for HotpatchEnablementStatus. */ public static final HotpatchEnablementStatus ENABLED = fromString("Enabled"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScope.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScope.java index 13c7ee3f5449..a739225973cf 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScope.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScope.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -57,7 +57,7 @@ public interface HybridComputePrivateLinkScope { HybridComputePrivateLinkScopeProperties properties(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the systemData property: The system meta data relating to this resource. * * @return the systemData value. */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/HybridComputePrivateLinkScopeListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeListResult.java similarity index 58% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/HybridComputePrivateLinkScopeListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeListResult.java index 9bbc744f49be..26eb84bc5495 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/HybridComputePrivateLinkScopeListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +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,29 +15,30 @@ import java.util.List; /** - * The response of a HybridComputePrivateLinkScope list operation. + * Describes the list of Azure Arc PrivateLinkScope resources. */ -@Immutable +@Fluent public final class HybridComputePrivateLinkScopeListResult implements JsonSerializable { /* - * The HybridComputePrivateLinkScope items on this page + * List of Azure Arc PrivateLinkScope definitions. */ private List value; /* - * The link to the next page of items + * The URI to get the next set of Azure Arc PrivateLinkScope definitions if too many PrivateLinkScopes where + * returned in the result set. */ private String nextLink; /** * Creates an instance of HybridComputePrivateLinkScopeListResult class. */ - private HybridComputePrivateLinkScopeListResult() { + public HybridComputePrivateLinkScopeListResult() { } /** - * Get the value property: The HybridComputePrivateLinkScope items on this page. + * Get the value property: List of Azure Arc PrivateLinkScope definitions. * * @return the value value. */ @@ -45,7 +47,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: List of Azure Arc PrivateLinkScope definitions. + * + * @param value the value value to set. + * @return the HybridComputePrivateLinkScopeListResult object itself. + */ + public HybridComputePrivateLinkScopeListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to get the next set of Azure Arc PrivateLinkScope definitions if too many + * PrivateLinkScopes where returned in the result set. * * @return the nextLink value. */ @@ -53,6 +67,35 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to get the next set of Azure Arc PrivateLinkScope definitions if too many + * PrivateLinkScopes where returned in the result set. + * + * @param nextLink the nextLink value to set. + * @return the HybridComputePrivateLinkScopeListResult object itself. + */ + public HybridComputePrivateLinkScopeListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model HybridComputePrivateLinkScopeListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HybridComputePrivateLinkScopeListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeProperties.java index 23c288a7ef37..758ca4e04bf0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -41,11 +41,6 @@ public final class HybridComputePrivateLinkScopeProperties */ private List privateEndpointConnections; - /* - * Enable private link validation for an Azure Arc Extension. - */ - private List serviceExtensions; - /** * Creates an instance of HybridComputePrivateLinkScopeProperties class. */ @@ -105,23 +100,14 @@ public List privateEndpointConnections() { } /** - * Get the serviceExtensions property: Enable private link validation for an Azure Arc Extension. - * - * @return the serviceExtensions value. - */ - public List serviceExtensions() { - return this.serviceExtensions; - } - - /** - * Set the serviceExtensions property: Enable private link validation for an Azure Arc Extension. + * Validates the instance. * - * @param serviceExtensions the serviceExtensions value to set. - * @return the HybridComputePrivateLinkScopeProperties object itself. + * @throws IllegalArgumentException thrown if the instance is not valid. */ - public HybridComputePrivateLinkScopeProperties withServiceExtensions(List serviceExtensions) { - this.serviceExtensions = serviceExtensions; - return this; + public void validate() { + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } } /** @@ -132,8 +118,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - jsonWriter.writeArrayField("serviceExtensions", this.serviceExtensions, - (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -165,10 +149,6 @@ public static HybridComputePrivateLinkScopeProperties fromJson(JsonReader jsonRe = reader.readArray(reader1 -> PrivateEndpointConnectionDataModel.fromJson(reader1)); deserializedHybridComputePrivateLinkScopeProperties.privateEndpointConnections = privateEndpointConnections; - } else if ("serviceExtensions".equals(fieldName)) { - List serviceExtensions - = reader.readArray(reader1 -> ServiceExtension.fromJson(reader1)); - deserializedHybridComputePrivateLinkScopeProperties.serviceExtensions = serviceExtensions; } else { reader.skipChildren(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Identity.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Identity.java index 2b2dffc899a2..f2716c804297 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Identity.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Identity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -17,12 +17,12 @@ @Fluent public final class Identity implements JsonSerializable { /* - * The principal ID of resource identity. The value must be an UUID. + * The principal ID of resource identity. */ private String principalId; /* - * The tenant ID of resource. The value must be an UUID. + * The tenant ID of resource. */ private String tenantId; @@ -38,7 +38,7 @@ public Identity() { } /** - * Get the principalId property: The principal ID of resource identity. The value must be an UUID. + * Get the principalId property: The principal ID of resource identity. * * @return the principalId value. */ @@ -47,7 +47,7 @@ public String principalId() { } /** - * Get the tenantId property: The tenant ID of resource. The value must be an UUID. + * Get the tenantId property: The tenant ID of resource. * * @return the tenantId value. */ @@ -75,6 +75,14 @@ public Identity withType(ResourceIdentityType type) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IdentityKeyStore.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IdentityKeyStore.java index 0ed9ac1c9f14..86ea3df8fa0b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IdentityKeyStore.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IdentityKeyStore.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class IdentityKeyStore extends ExpandableStringEnum { /** - * TPM. + * Static value TPM for IdentityKeyStore. */ public static final IdentityKeyStore TPM = fromString("TPM"); /** - * Default. + * Static value Default for IdentityKeyStore. */ public static final IdentityKeyStore DEFAULT = fromString("Default"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/InstanceViewTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/InstanceViewTypes.java index 3083fc560d0c..0cf987ee9330 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/InstanceViewTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/InstanceViewTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,7 +12,7 @@ */ public final class InstanceViewTypes extends ExpandableStringEnum { /** - * instanceView. + * Static value instanceView for InstanceViewTypes. */ public static final InstanceViewTypes INSTANCE_VIEW = fromString("instanceView"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IpAddress.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IpAddress.java index 030febc14183..a8affdb14384 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IpAddress.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IpAddress.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Describes properties of the IP address. */ -@Immutable +@Fluent public final class IpAddress implements JsonSerializable { /* * Represents the IP Address. @@ -34,7 +34,7 @@ public final class IpAddress implements JsonSerializable { /** * Creates an instance of IpAddress class. */ - private IpAddress() { + public IpAddress() { } /** @@ -46,6 +46,17 @@ public String address() { return this.address; } + /** + * Set the address property: Represents the IP Address. + * + * @param address the address value to set. + * @return the IpAddress object itself. + */ + public IpAddress withAddress(String address) { + this.address = address; + return this; + } + /** * Get the ipAddressVersion property: Represents the Ip Address Version. * @@ -55,6 +66,17 @@ public String ipAddressVersion() { return this.ipAddressVersion; } + /** + * Set the ipAddressVersion property: Represents the Ip Address Version. + * + * @param ipAddressVersion the ipAddressVersion value to set. + * @return the IpAddress object itself. + */ + public IpAddress withIpAddressVersion(String ipAddressVersion) { + this.ipAddressVersion = ipAddressVersion; + return this; + } + /** * Get the subnet property: The subnet to which this IP address belongs. * @@ -64,6 +86,17 @@ public Subnet subnet() { return this.subnet; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnet() != null) { + subnet().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LastAttemptStatusEnum.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LastAttemptStatusEnum.java index f5f815268f2c..7d92130240b3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LastAttemptStatusEnum.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LastAttemptStatusEnum.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class LastAttemptStatusEnum extends ExpandableStringEnum { /** - * Success. + * Static value Success for LastAttemptStatusEnum. */ public static final LastAttemptStatusEnum SUCCESS = fromString("Success"); /** - * Failed. + * Static value Failed for LastAttemptStatusEnum. */ public static final LastAttemptStatusEnum FAILED = fromString("Failed"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/License.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/License.java index 6c842d8e52af..191671dffd68 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/License.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/License.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseAssignmentState.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseAssignmentState.java index 73cdfb811134..4d0ef625ef95 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseAssignmentState.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseAssignmentState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class LicenseAssignmentState extends ExpandableStringEnum { /** - * Assigned. + * Static value Assigned for LicenseAssignmentState. */ public static final LicenseAssignmentState ASSIGNED = fromString("Assigned"); /** - * NotAssigned. + * Static value NotAssigned for LicenseAssignmentState. */ public static final LicenseAssignmentState NOT_ASSIGNED = fromString("NotAssigned"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseCoreType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseCoreType.java index f712d401cfd4..7d68436ebb55 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseCoreType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseCoreType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class LicenseCoreType extends ExpandableStringEnum { /** - * pCore. + * Static value pCore for LicenseCoreType. */ public static final LicenseCoreType P_CORE = fromString("pCore"); /** - * vCore. + * Static value vCore for LicenseCoreType. */ public static final LicenseCoreType V_CORE = fromString("vCore"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseDetails.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseDetails.java index 752415e5e77d..9a1f2194cd6c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseDetails.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -201,6 +201,17 @@ public LicenseDetails withVolumeLicenseDetails(List volume return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (volumeLicenseDetails() != null) { + volumeLicenseDetails().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseEdition.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseEdition.java index d252f2dd9ab4..367a41be3b99 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseEdition.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseEdition.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class LicenseEdition extends ExpandableStringEnum { /** - * Standard. + * Static value Standard for LicenseEdition. */ public static final LicenseEdition STANDARD = fromString("Standard"); /** - * Datacenter. + * Static value Datacenter for LicenseEdition. */ public static final LicenseEdition DATACENTER = fromString("Datacenter"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfile.java index 27bdb2d7bb0d..03c94453a24d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfile.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.java index c2108264958d..8856d1dd5e1c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -127,6 +127,18 @@ public String assignedLicenseImmutableId() { return this.assignedLicenseImmutableId; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (esuKeys() != null) { + esuKeys().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceView.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceView.java index 21df6d932ddc..582c7386a8aa 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceView.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceView.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceViewEsuProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceViewEsuProperties.java index f542eb737781..2b2a7cc2cd0d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceViewEsuProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceViewEsuProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileProductType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileProductType.java index 5941a8c60bba..058dd6f0cf28 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileProductType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileProductType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class LicenseProfileProductType extends ExpandableStringEnum { /** - * WindowsServer. + * Static value WindowsServer for LicenseProfileProductType. */ public static final LicenseProfileProductType WINDOWS_SERVER = fromString("WindowsServer"); /** - * WindowsIoTEnterprise. + * Static value WindowsIoTEnterprise for LicenseProfileProductType. */ public static final LicenseProfileProductType WINDOWS_IO_TENTERPRISE = fromString("WindowsIoTEnterprise"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileStorageModelEsuProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileStorageModelEsuProperties.java index 08c59ba35e6f..a9505163d794 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileStorageModelEsuProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileStorageModelEsuProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -74,6 +74,17 @@ LicenseProfileStorageModelEsuProperties withEsuKeys(List esuKeys) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (esuKeys() != null) { + esuKeys().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatus.java index 60177471e2d2..502d339f0083 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,32 +12,32 @@ */ public final class LicenseProfileSubscriptionStatus extends ExpandableStringEnum { /** - * Unknown. + * Static value Unknown for LicenseProfileSubscriptionStatus. */ public static final LicenseProfileSubscriptionStatus UNKNOWN = fromString("Unknown"); /** - * Enabling. + * Static value Enabling for LicenseProfileSubscriptionStatus. */ public static final LicenseProfileSubscriptionStatus ENABLING = fromString("Enabling"); /** - * Enabled. + * Static value Enabled for LicenseProfileSubscriptionStatus. */ public static final LicenseProfileSubscriptionStatus ENABLED = fromString("Enabled"); /** - * Disabled. + * Static value Disabled for LicenseProfileSubscriptionStatus. */ public static final LicenseProfileSubscriptionStatus DISABLED = fromString("Disabled"); /** - * Disabling. + * Static value Disabling for LicenseProfileSubscriptionStatus. */ public static final LicenseProfileSubscriptionStatus DISABLING = fromString("Disabling"); /** - * Failed. + * Static value Failed for LicenseProfileSubscriptionStatus. */ public static final LicenseProfileSubscriptionStatus FAILED = fromString("Failed"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatusUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatusUpdate.java index a090eb44dbdf..3939ed6be8b4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatusUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatusUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -13,12 +13,12 @@ public final class LicenseProfileSubscriptionStatusUpdate extends ExpandableStringEnum { /** - * Enable. + * Static value Enable for LicenseProfileSubscriptionStatusUpdate. */ public static final LicenseProfileSubscriptionStatusUpdate ENABLE = fromString("Enable"); /** - * Disable. + * Static value Disable for LicenseProfileSubscriptionStatusUpdate. */ public static final LicenseProfileSubscriptionStatusUpdate DISABLE = fromString("Disable"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileUpdate.java index eb82bfdfbbb0..00b65d16e11e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -164,6 +164,18 @@ public LicenseProfileUpdate withProductFeatures(List produ return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfiles.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfiles.java index 6f1e523391c1..13f89cbdfde5 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfiles.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfiles.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -64,11 +64,12 @@ public interface LicenseProfiles { * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items as paginated response with {@link PagedIterable}. + * @return the List hybrid machine license profile operation response as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String machineName); @@ -76,12 +77,13 @@ public interface LicenseProfiles { * The operation to get all license profiles of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the 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 paged collection of LicenseProfile items as paginated response with {@link PagedIterable}. + * @return the List hybrid machine license profile operation response as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String machineName, Context context); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/LicenseProfilesListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfilesListResult.java similarity index 58% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/LicenseProfilesListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfilesListResult.java index b7a7308399a2..5f1e817a1fb1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/LicenseProfilesListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfilesListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +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,28 +15,29 @@ import java.util.List; /** - * Paged collection of LicenseProfile items. + * The List hybrid machine license profile operation response. */ -@Immutable +@Fluent public final class LicenseProfilesListResult implements JsonSerializable { /* - * The LicenseProfile items on this page + * The list of license profiles. */ private List value; /* - * The link to the next page of items + * The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of license + * profile. */ private String nextLink; /** * Creates an instance of LicenseProfilesListResult class. */ - private LicenseProfilesListResult() { + public LicenseProfilesListResult() { } /** - * Get the value property: The LicenseProfile items on this page. + * Get the value property: The list of license profiles. * * @return the value value. */ @@ -44,7 +46,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: The list of license profiles. + * + * @param value the value value to set. + * @return the LicenseProfilesListResult object itself. + */ + public LicenseProfilesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the + * next page of license profile. * * @return the nextLink value. */ @@ -52,6 +66,35 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the + * next page of license profile. + * + * @param nextLink the nextLink value to set. + * @return the LicenseProfilesListResult object itself. + */ + public LicenseProfilesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model LicenseProfilesListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LicenseProfilesListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseState.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseState.java index 0961f4a37245..f55f51a0b4e6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseState.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class LicenseState extends ExpandableStringEnum { /** - * Activated. + * Static value Activated for LicenseState. */ public static final LicenseState ACTIVATED = fromString("Activated"); /** - * Deactivated. + * Static value Deactivated for LicenseState. */ public static final LicenseState DEACTIVATED = fromString("Deactivated"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseStatus.java index bb8268e46cd7..b7e5b7dd650d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,37 +12,37 @@ */ public final class LicenseStatus extends ExpandableStringEnum { /** - * Unlicensed. + * Static value Unlicensed for LicenseStatus. */ public static final LicenseStatus UNLICENSED = fromString("Unlicensed"); /** - * Licensed. + * Static value Licensed for LicenseStatus. */ public static final LicenseStatus LICENSED = fromString("Licensed"); /** - * OOBGrace. + * Static value OOBGrace for LicenseStatus. */ public static final LicenseStatus OOBGRACE = fromString("OOBGrace"); /** - * OOTGrace. + * Static value OOTGrace for LicenseStatus. */ public static final LicenseStatus OOTGRACE = fromString("OOTGrace"); /** - * NonGenuineGrace. + * Static value NonGenuineGrace for LicenseStatus. */ public static final LicenseStatus NON_GENUINE_GRACE = fromString("NonGenuineGrace"); /** - * Notification. + * Static value Notification for LicenseStatus. */ public static final LicenseStatus NOTIFICATION = fromString("Notification"); /** - * ExtendedGrace. + * Static value ExtendedGrace for LicenseStatus. */ public static final LicenseStatus EXTENDED_GRACE = fromString("ExtendedGrace"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseTarget.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseTarget.java index ce896fddf454..9b667e67dd99 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseTarget.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseTarget.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class LicenseTarget extends ExpandableStringEnum { /** - * Windows Server 2012. + * Static value Windows Server 2012 for LicenseTarget. */ public static final LicenseTarget WINDOWS_SERVER_2012 = fromString("Windows Server 2012"); /** - * Windows Server 2012 R2. + * Static value Windows Server 2012 R2 for LicenseTarget. */ public static final LicenseTarget WINDOWS_SERVER_2012_R2 = fromString("Windows Server 2012 R2"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseType.java index 0ba7a535a6f3..9b6dae72ed5f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,7 +12,7 @@ */ public final class LicenseType extends ExpandableStringEnum { /** - * ESU. + * Static value ESU for LicenseType. */ public static final LicenseType ESU = fromString("ESU"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseUpdate.java index 8f3582149c4f..bb9890a7f57c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -184,6 +184,18 @@ public LicenseUpdate withProcessors(Integer processors) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Licenses.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Licenses.java index 41d20b55c9b1..6c5b60a68af5 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Licenses.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Licenses.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -13,6 +13,29 @@ * Resource collection API of Licenses. */ public interface Licenses { + /** + * The operation to validate a license. + * + * @param parameters Parameters supplied to the license validation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine. + */ + License validateLicense(LicenseInner parameters); + + /** + * The operation to validate a license. + * + * @param parameters Parameters supplied to the license validation operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a license in a hybrid machine. + */ + License validateLicense(LicenseInner parameters, Context context); + /** * Retrieves information about the view of a license. * @@ -68,7 +91,7 @@ public interface Licenses { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -80,7 +103,7 @@ public interface Licenses { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -89,7 +112,7 @@ public interface Licenses { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -100,33 +123,10 @@ public interface Licenses { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of License items as paginated response with {@link PagedIterable}. + * @return the List license operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - License validateLicense(LicenseInner parameters); - - /** - * The operation to validate a license. - * - * @param parameters 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 describes a license in a hybrid machine. - */ - License validateLicense(LicenseInner parameters, Context context); - /** * Retrieves information about the view of a license. * diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/LicensesListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicensesListResult.java similarity index 58% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/LicensesListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicensesListResult.java index 1531e95c7fec..eac31a9d00cc 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/LicensesListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicensesListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +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,28 +15,29 @@ import java.util.List; /** - * Paged collection of License items. + * The List license operation response. */ -@Immutable +@Fluent public final class LicensesListResult implements JsonSerializable { /* - * The License items on this page + * The list of licenses. */ private List value; /* - * The link to the next page of items + * The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of license + * profile. */ private String nextLink; /** * Creates an instance of LicensesListResult class. */ - private LicensesListResult() { + public LicensesListResult() { } /** - * Get the value property: The License items on this page. + * Get the value property: The list of licenses. * * @return the value value. */ @@ -44,7 +46,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: The list of licenses. + * + * @param value the value value to set. + * @return the LicensesListResult object itself. + */ + public LicensesListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the + * next page of license profile. * * @return the nextLink value. */ @@ -52,6 +66,34 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the + * next page of license profile. + * + * @param nextLink the nextLink value to set. + * @return the LicensesListResult object itself. + */ + public LicensesListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model LicensesListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LicensesListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LinuxParameters.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LinuxParameters.java index 2079d8f63008..94c9df5bf4f0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LinuxParameters.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LinuxParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -105,6 +105,14 @@ public LinuxParameters withPackageNameMasksToExclude(List packageNameMas return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LocationData.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LocationData.java index 95a6873960de..f4c2910607a1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LocationData.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LocationData.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.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; @@ -122,6 +123,20 @@ public LocationData withCountryOrRegion(String countryOrRegion) { 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 LocationData")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LocationData.class); + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machine.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machine.java index 3a4b823abdfc..6c2b99554273 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machine.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machine.java @@ -1,18 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.management.Region; import com.azure.core.management.SystemData; import com.azure.core.management.exception.ManagementError; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; +import java.util.UUID; /** * An immutable client-side representation of Machine. @@ -193,7 +191,7 @@ public interface Machine { * * @return the vmId value. */ - String vmId(); + UUID vmId(); /** * Gets the displayName property: Specifies the hybrid machine display name. @@ -258,7 +256,7 @@ public interface Machine { * * @return the vmUuid value. */ - String vmUuid(); + UUID vmUuid(); /** * Gets the extensions property: Machine Extensions information (deprecated field). @@ -347,583 +345,10 @@ public interface Machine { */ NetworkProfile networkProfile(); - /** - * 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.hybridcompute.fluent.models.MachineInner object. * * @return the inner object. */ MachineInner innerModel(); - - /** - * The entirety of the Machine definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The Machine definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Machine definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Machine 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 Machine definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the Machine 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.WithKind, - DefinitionStages.WithLocationData, DefinitionStages.WithServiceStatuses, DefinitionStages.WithCloudMetadata, - DefinitionStages.WithAgentUpgrade, DefinitionStages.WithOsProfile, DefinitionStages.WithLicenseProfile, - DefinitionStages.WithVmId, DefinitionStages.WithClientPublicKey, DefinitionStages.WithIdentityKeyStore, - DefinitionStages.WithTpmEkCertificate, DefinitionStages.WithOsType, DefinitionStages.WithExtensions, - DefinitionStages.WithPrivateLinkScopeResourceId, DefinitionStages.WithParentClusterResourceId, - DefinitionStages.WithHardwareResourceId, DefinitionStages.WithMssqlDiscovered, DefinitionStages.WithExpand { - /** - * Executes the create request. - * - * @return the created resource. - */ - Machine create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Machine create(Context context); - } - - /** - * The stage of the Machine 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 Machine definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Identity for the resource.. - * - * @param identity Identity for the resource. - * @return the next definition stage. - */ - WithCreate withIdentity(Identity identity); - } - - /** - * The stage of the Machine definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Indicates which kind of Arc machine placement on-premises, such as HCI, - * SCVMM or VMware etc.. - * - * @param kind Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - * @return the next definition stage. - */ - WithCreate withKind(ArcKindEnum kind); - } - - /** - * The stage of the Machine definition allowing to specify locationData. - */ - interface WithLocationData { - /** - * Specifies the locationData property: Metadata pertaining to the geographic location of the resource.. - * - * @param locationData Metadata pertaining to the geographic location of the resource. - * @return the next definition stage. - */ - WithCreate withLocationData(LocationData locationData); - } - - /** - * The stage of the Machine definition allowing to specify serviceStatuses. - */ - interface WithServiceStatuses { - /** - * Specifies the serviceStatuses property: Statuses of dependent services that are reported back to ARM.. - * - * @param serviceStatuses Statuses of dependent services that are reported back to ARM. - * @return the next definition stage. - */ - WithCreate withServiceStatuses(ServiceStatuses serviceStatuses); - } - - /** - * The stage of the Machine definition allowing to specify cloudMetadata. - */ - interface WithCloudMetadata { - /** - * Specifies the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...).. - * - * @param cloudMetadata The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * @return the next definition stage. - */ - WithCreate withCloudMetadata(CloudMetadata cloudMetadata); - } - - /** - * The stage of the Machine definition allowing to specify agentUpgrade. - */ - interface WithAgentUpgrade { - /** - * Specifies the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * - * @param agentUpgrade The info of the machine w.r.t Agent Upgrade. - * @return the next definition stage. - */ - WithCreate withAgentUpgrade(AgentUpgrade agentUpgrade); - } - - /** - * The stage of the Machine definition allowing to specify osProfile. - */ - interface WithOsProfile { - /** - * Specifies the osProfile property: Specifies the operating system settings for the hybrid machine.. - * - * @param osProfile Specifies the operating system settings for the hybrid machine. - * @return the next definition stage. - */ - WithCreate withOsProfile(OSProfile osProfile); - } - - /** - * The stage of the Machine definition allowing to specify licenseProfile. - */ - interface WithLicenseProfile { - /** - * Specifies the licenseProfile property: Specifies the License related properties for a machine.. - * - * @param licenseProfile Specifies the License related properties for a machine. - * @return the next definition stage. - */ - WithCreate withLicenseProfile(LicenseProfileMachineInstanceViewInner licenseProfile); - } - - /** - * The stage of the Machine definition allowing to specify vmId. - */ - interface WithVmId { - /** - * Specifies the vmId property: Specifies the hybrid machine unique ID.. - * - * @param vmId Specifies the hybrid machine unique ID. - * @return the next definition stage. - */ - WithCreate withVmId(String vmId); - } - - /** - * The stage of the Machine definition allowing to specify clientPublicKey. - */ - interface WithClientPublicKey { - /** - * Specifies the clientPublicKey property: Public Key that the client provides to be used during initial - * resource onboarding. - * - * @param clientPublicKey Public Key that the client provides to be used during initial resource onboarding. - * @return the next definition stage. - */ - WithCreate withClientPublicKey(String clientPublicKey); - } - - /** - * The stage of the Machine definition allowing to specify identityKeyStore. - */ - interface WithIdentityKeyStore { - /** - * Specifies the identityKeyStore property: Specifies the identity key store a machine is using.. - * - * @param identityKeyStore Specifies the identity key store a machine is using. - * @return the next definition stage. - */ - WithCreate withIdentityKeyStore(IdentityKeyStore identityKeyStore); - } - - /** - * The stage of the Machine definition allowing to specify tpmEkCertificate. - */ - interface WithTpmEkCertificate { - /** - * Specifies the tpmEkCertificate property: Endorsement Key Certificate of the Trusted Platform Module (TPM) - * that the client provides to be used during initial resource onboarding.. - * - * @param tpmEkCertificate Endorsement Key Certificate of the Trusted Platform Module (TPM) that the client - * provides to be used during initial resource onboarding. - * @return the next definition stage. - */ - WithCreate withTpmEkCertificate(String tpmEkCertificate); - } - - /** - * The stage of the Machine definition allowing to specify osType. - */ - interface WithOsType { - /** - * Specifies the osType property: The type of Operating System (windows/linux).. - * - * @param osType The type of Operating System (windows/linux). - * @return the next definition stage. - */ - WithCreate withOsType(String osType); - } - - /** - * The stage of the Machine definition allowing to specify extensions. - */ - interface WithExtensions { - /** - * Specifies the extensions property: Machine Extensions information (deprecated field). - * - * @param extensions Machine Extensions information (deprecated field). - * @return the next definition stage. - */ - WithCreate withExtensions(List extensions); - } - - /** - * The stage of the Machine definition allowing to specify privateLinkScopeResourceId. - */ - interface WithPrivateLinkScopeResourceId { - /** - * Specifies the privateLinkScopeResourceId property: The resource id of the private link scope this machine - * is assigned to, if any.. - * - * @param privateLinkScopeResourceId The resource id of the private link scope this machine is assigned to, - * if any. - * @return the next definition stage. - */ - WithCreate withPrivateLinkScopeResourceId(String privateLinkScopeResourceId); - } - - /** - * The stage of the Machine definition allowing to specify parentClusterResourceId. - */ - interface WithParentClusterResourceId { - /** - * Specifies the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this - * machine is assigned to, if any.. - * - * @param parentClusterResourceId The resource id of the parent cluster (Azure HCI) this machine is assigned - * to, if any. - * @return the next definition stage. - */ - WithCreate withParentClusterResourceId(String parentClusterResourceId); - } - - /** - * The stage of the Machine definition allowing to specify hardwareResourceId. - */ - interface WithHardwareResourceId { - /** - * Specifies the hardwareResourceId property: Specifies the resource ID of the associated hardware device. - * Only settable by HCI RP.. - * - * @param hardwareResourceId Specifies the resource ID of the associated hardware device. Only settable by - * HCI RP. - * @return the next definition stage. - */ - WithCreate withHardwareResourceId(String hardwareResourceId); - } - - /** - * The stage of the Machine definition allowing to specify mssqlDiscovered. - */ - interface WithMssqlDiscovered { - /** - * Specifies the mssqlDiscovered property: Specifies whether any MS SQL instance is discovered on the - * machine.. - * - * @param mssqlDiscovered Specifies whether any MS SQL instance is discovered on the machine. - * @return the next definition stage. - */ - WithCreate withMssqlDiscovered(String mssqlDiscovered); - } - - /** - * The stage of the Machine definition allowing to specify expand. - */ - interface WithExpand { - /** - * Specifies the expand property: Expands referenced resources.. - * - * @param expand Expands referenced resources. - * @return the next definition stage. - */ - WithCreate withExpand(String expand); - } - } - - /** - * Begins update for the Machine resource. - * - * @return the stage of resource update. - */ - Machine.Update update(); - - /** - * The template for Machine update. - */ - interface Update - extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithKind, UpdateStages.WithLocationData, - UpdateStages.WithOsProfile, UpdateStages.WithCloudMetadata, UpdateStages.WithAgentUpgrade, - UpdateStages.WithParentClusterResourceId, UpdateStages.WithPrivateLinkScopeResourceId, - UpdateStages.WithIdentityKeyStore, UpdateStages.WithTpmEkCertificate { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Machine apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Machine apply(Context context); - } - - /** - * The Machine update stages. - */ - interface UpdateStages { - /** - * The stage of the Machine 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 Machine update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Identity for the resource.. - * - * @param identity Identity for the resource. - * @return the next definition stage. - */ - Update withIdentity(Identity identity); - } - - /** - * The stage of the Machine update allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Indicates which kind of Arc machine placement on-premises, such as HCI, - * SCVMM or VMware etc.. - * - * @param kind Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - * @return the next definition stage. - */ - Update withKind(ArcKindEnum kind); - } - - /** - * The stage of the Machine update allowing to specify locationData. - */ - interface WithLocationData { - /** - * Specifies the locationData property: Metadata pertaining to the geographic location of the resource.. - * - * @param locationData Metadata pertaining to the geographic location of the resource. - * @return the next definition stage. - */ - Update withLocationData(LocationData locationData); - } - - /** - * The stage of the Machine update allowing to specify osProfile. - */ - interface WithOsProfile { - /** - * Specifies the osProfile property: Specifies the operating system settings for the hybrid machine.. - * - * @param osProfile Specifies the operating system settings for the hybrid machine. - * @return the next definition stage. - */ - Update withOsProfile(OSProfile osProfile); - } - - /** - * The stage of the Machine update allowing to specify cloudMetadata. - */ - interface WithCloudMetadata { - /** - * Specifies the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...).. - * - * @param cloudMetadata The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * @return the next definition stage. - */ - Update withCloudMetadata(CloudMetadata cloudMetadata); - } - - /** - * The stage of the Machine update allowing to specify agentUpgrade. - */ - interface WithAgentUpgrade { - /** - * Specifies the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * - * @param agentUpgrade The info of the machine w.r.t Agent Upgrade. - * @return the next definition stage. - */ - Update withAgentUpgrade(AgentUpgrade agentUpgrade); - } - - /** - * The stage of the Machine update allowing to specify parentClusterResourceId. - */ - interface WithParentClusterResourceId { - /** - * Specifies the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this - * machine is assigned to, if any.. - * - * @param parentClusterResourceId The resource id of the parent cluster (Azure HCI) this machine is assigned - * to, if any. - * @return the next definition stage. - */ - Update withParentClusterResourceId(String parentClusterResourceId); - } - - /** - * The stage of the Machine update allowing to specify privateLinkScopeResourceId. - */ - interface WithPrivateLinkScopeResourceId { - /** - * Specifies the privateLinkScopeResourceId property: The resource id of the private link scope this machine - * is assigned to, if any.. - * - * @param privateLinkScopeResourceId The resource id of the private link scope this machine is assigned to, - * if any. - * @return the next definition stage. - */ - Update withPrivateLinkScopeResourceId(String privateLinkScopeResourceId); - } - - /** - * The stage of the Machine update allowing to specify identityKeyStore. - */ - interface WithIdentityKeyStore { - /** - * Specifies the identityKeyStore property: Identity key store type of the machine. - * - * @param identityKeyStore Identity key store type of the machine. - * @return the next definition stage. - */ - Update withIdentityKeyStore(String identityKeyStore); - } - - /** - * The stage of the Machine update allowing to specify tpmEkCertificate. - */ - interface WithTpmEkCertificate { - /** - * Specifies the tpmEkCertificate property: Endorsement Key Certificate of the Trusted Platform Module (TPM) - * that the client provides to be used during initial resource onboarding.. - * - * @param tpmEkCertificate Endorsement Key Certificate of the Trusted Platform Module (TPM) that the client - * provides to be used during initial resource onboarding. - * @return the next definition stage. - */ - Update withTpmEkCertificate(String tpmEkCertificate); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Machine refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Machine refresh(Context context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineAssessPatchesResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineAssessPatchesResult.java index d62329cca474..15381d502e7f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineAssessPatchesResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineAssessPatchesResult.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; import com.azure.core.management.exception.ManagementError; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineAssessPatchesResultInner; import java.time.OffsetDateTime; +import java.util.UUID; /** * An immutable client-side representation of MachineAssessPatchesResult. @@ -26,7 +27,7 @@ public interface MachineAssessPatchesResult { * * @return the assessmentActivityId value. */ - String assessmentActivityId(); + UUID assessmentActivityId(); /** * Gets the rebootPending property: The overall reboot status of the VM. It will be true when partially installed diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtension.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtension.java index c60ff02e00cb..033c5380ec79 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtension.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtension.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -137,7 +137,7 @@ interface WithParentResource { * Specifies resourceGroupName, machineName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be created or updated. * @return the next definition stage. */ WithCreate withExistingMachine(String resourceGroupName, String machineName); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceView.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceView.java index bc2dab750b54..9a397c900805 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceView.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceView.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -122,6 +122,17 @@ public MachineExtensionInstanceView withStatus(MachineExtensionInstanceViewStatu return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() != null) { + status().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceViewStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceViewStatus.java index 4b319e22b48e..2d15931dbddd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceViewStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceViewStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -150,6 +150,14 @@ public MachineExtensionInstanceViewStatus withTime(OffsetDateTime time) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionProperties.java index bb4b13f203f2..a3ac7c85e47a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -276,6 +276,17 @@ public MachineExtensionProperties withInstanceView(MachineExtensionInstanceView return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (instanceView() != null) { + instanceView().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpdate.java index 08ad00ed3667..4937b499a062 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -240,6 +240,18 @@ public MachineExtensionUpdate withProtectedSettings(Map protecte return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpgrade.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpgrade.java index ecfa08c2f696..2d3a7ceac5ec 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpgrade.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpgrade.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -48,6 +48,21 @@ public MachineExtensionUpgrade withExtensionTargets(Map { + if (e != null) { + e.validate(); + } + }); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensions.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensions.java index 1795cbc75d4f..6a049ba7baf0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensions.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -13,67 +13,67 @@ */ public interface MachineExtensions { /** - * The operation to get the extension. + * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Machine Extension along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String machineName, String extensionName, - Context context); + void delete(String resourceGroupName, String machineName, String extensionName); /** - * The operation to get the extension. + * The operation to delete the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Machine Extension. */ - MachineExtension get(String resourceGroupName, String machineName, String extensionName); + void delete(String resourceGroupName, String machineName, String extensionName, Context context); /** - * The operation to delete the extension. + * The operation to get the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Machine Extension along with {@link Response}. */ - void delete(String resourceGroupName, String machineName, String extensionName); + Response getWithResponse(String resourceGroupName, String machineName, String extensionName, + Context context); /** - * The operation to delete the extension. + * The operation to get the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Machine Extension. */ - void delete(String resourceGroupName, String machineName, String extensionName, Context context); + MachineExtension get(String resourceGroupName, String machineName, String extensionName); /** * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items as paginated response with {@link PagedIterable}. + * @return describes the Machine Extensions List Result as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String machineName); @@ -81,13 +81,13 @@ Response getWithResponse(String resourceGroupName, String mach * The operation to get all extensions of a non-Azure machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. + * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineExtension items as paginated response with {@link PagedIterable}. + * @return describes the Machine Extensions List Result as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String machineName, String expand, Context context); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineExtensionsListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionsListResult.java similarity index 62% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineExtensionsListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionsListResult.java index 2151b09be040..64d487ca91ec 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineExtensionsListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,29 @@ import java.util.List; /** - * Paged collection of MachineExtension items. + * Describes the Machine Extensions List Result. */ -@Immutable +@Fluent public final class MachineExtensionsListResult implements JsonSerializable { /* - * The MachineExtension items on this page + * The list of extensions */ private List value; /* - * The link to the next page of items + * The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of + * extensions. */ private String nextLink; /** * Creates an instance of MachineExtensionsListResult class. */ - private MachineExtensionsListResult() { + public MachineExtensionsListResult() { } /** - * Get the value property: The MachineExtension items on this page. + * Get the value property: The list of extensions. * * @return the value value. */ @@ -44,7 +45,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: The list of extensions. + * + * @param value the value value to set. + * @return the MachineExtensionsListResult object itself. + */ + public MachineExtensionsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The uri to fetch the next page of machine extensions. Call ListNext() with this to + * fetch the next page of extensions. * * @return the nextLink value. */ @@ -52,6 +65,29 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The uri to fetch the next page of machine extensions. Call ListNext() with this to + * fetch the next page of extensions. + * + * @param nextLink the nextLink value to set. + * @return the MachineExtensionsListResult object itself. + */ + public MachineExtensionsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ @@ -69,7 +105,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MachineExtensionsListResult 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 MachineExtensionsListResult. */ public static MachineExtensionsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesParameters.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesParameters.java index 4fe7ae899737..7729161f5aeb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesParameters.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesParameters.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.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; @@ -127,6 +128,32 @@ public MachineInstallPatchesParameters withLinuxParameters(LinuxParameters linux return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (maximumDuration() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property maximumDuration in model MachineInstallPatchesParameters")); + } + if (rebootSetting() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property rebootSetting in model MachineInstallPatchesParameters")); + } + if (windowsParameters() != null) { + windowsParameters().validate(); + } + if (linuxParameters() != null) { + linuxParameters().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MachineInstallPatchesParameters.class); + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesResult.java index 98f026e9c370..a53fe37c78cd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineListResult.java similarity index 58% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineListResult.java index 51151727320f..937f4ccfe2d5 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +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,28 +15,29 @@ import java.util.List; /** - * The response of a Machine list operation. + * The List hybrid machine operation response. */ -@Immutable +@Fluent public final class MachineListResult implements JsonSerializable { /* - * The Machine items on this page + * The list of hybrid machines. */ private List value; /* - * The link to the next page of items + * The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of hybrid + * machines. */ private String nextLink; /** * Creates an instance of MachineListResult class. */ - private MachineListResult() { + public MachineListResult() { } /** - * Get the value property: The Machine items on this page. + * Get the value property: The list of hybrid machines. * * @return the value value. */ @@ -44,7 +46,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: The list of hybrid machines. + * + * @param value the value value to set. + * @return the MachineListResult object itself. + */ + public MachineListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the + * next page of hybrid machines. * * @return the nextLink value. */ @@ -52,6 +66,34 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the + * next page of hybrid machines. + * + * @param nextLink the nextLink value to set. + * @return the MachineListResult object itself. + */ + public MachineListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model MachineListResult")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MachineListResult.class); + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineProperties.java index f9207ec8b27e..a9aa5a8201d2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -9,6 +9,7 @@ import java.time.OffsetDateTime; import java.util.List; import java.util.Map; +import java.util.UUID; /** * An immutable client-side representation of MachineProperties. @@ -125,7 +126,7 @@ public interface MachineProperties { * * @return the vmId value. */ - String vmId(); + UUID vmId(); /** * Gets the displayName property: Specifies the hybrid machine display name. @@ -190,7 +191,7 @@ public interface MachineProperties { * * @return the vmUuid value. */ - String vmUuid(); + UUID vmUuid(); /** * Gets the extensions property: Machine Extensions information (deprecated field). diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommand.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommand.java index 3ff700f3da87..c0aef58885f8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommand.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommand.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -383,7 +383,7 @@ interface WithOutputBlobUri { /** * Specifies the outputBlobUri property: Specifies the Azure storage blob where script output stream will be * uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM - * access to the blob. Refer outputBlobManagedIdentity parameter.. + * access to the blob. Refer outputBlobManagedIdentity parameter. . * * @param outputBlobUri Specifies the Azure storage blob where script output stream will be uploaded. Use a * SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the @@ -419,7 +419,7 @@ interface WithOutputBlobManagedIdentity { * outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed * identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. * In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed - * identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + * identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged . * * @param outputBlobManagedIdentity User-assigned managed identity that has access to outputBlobUri storage * blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given @@ -440,7 +440,7 @@ interface WithErrorBlobManagedIdentity { * errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed * identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. * In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed - * identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + * identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged . * * @param errorBlobManagedIdentity User-assigned managed identity that has access to errorBlobUri storage * blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given @@ -603,7 +603,7 @@ interface WithOutputBlobUri { /** * Specifies the outputBlobUri property: Specifies the Azure storage blob where script output stream will be * uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM - * access to the blob. Refer outputBlobManagedIdentity parameter.. + * access to the blob. Refer outputBlobManagedIdentity parameter. . * * @param outputBlobUri Specifies the Azure storage blob where script output stream will be uploaded. Use a * SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the @@ -639,7 +639,7 @@ interface WithOutputBlobManagedIdentity { * outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed * identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. * In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed - * identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + * identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged . * * @param outputBlobManagedIdentity User-assigned managed identity that has access to outputBlobUri storage * blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given @@ -660,7 +660,7 @@ interface WithErrorBlobManagedIdentity { * errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed * identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. * In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed - * identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged. + * identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged . * * @param errorBlobManagedIdentity User-assigned managed identity that has access to errorBlobUri storage * blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandInstanceView.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandInstanceView.java index fdaa59dde1a2..47430b53e41e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandInstanceView.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandInstanceView.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -18,7 +18,7 @@ /** * The instance view of a machine run command. */ -@Immutable +@Fluent public final class MachineRunCommandInstanceView implements JsonSerializable { /* * Script execution status. @@ -63,7 +63,7 @@ public final class MachineRunCommandInstanceView implements JsonSerializable statuses() { return this.statuses; } + /** + * Set the statuses property: The status information. + * + * @param statuses the statuses value to set. + * @return the MachineRunCommandInstanceView object itself. + */ + public MachineRunCommandInstanceView withStatuses(List statuses) { + this.statuses = statuses; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (statuses() != null) { + statuses().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandScriptSource.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandScriptSource.java index bdd8c1ec41ca..b452f724f1bf 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandScriptSource.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandScriptSource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -138,6 +138,17 @@ public RunCommandManagedIdentity scriptUriManagedIdentity() { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scriptUriManagedIdentity() != null) { + scriptUriManagedIdentity().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandUpdate.java new file mode 100644 index 000000000000..90444f484dfd --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandUpdate.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Describes a Machine Extension Update. + */ +@Fluent +public final class MachineRunCommandUpdate extends ResourceUpdate { + /** + * Creates an instance of MachineRunCommandUpdate class. + */ + public MachineRunCommandUpdate() { + } + + /** + * {@inheritDoc} + */ + @Override + public MachineRunCommandUpdate withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineRunCommandUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineRunCommandUpdate 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 MachineRunCommandUpdate. + */ + public static MachineRunCommandUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineRunCommandUpdate deserializedMachineRunCommandUpdate = new MachineRunCommandUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMachineRunCommandUpdate.withTags(tags); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineRunCommandUpdate; + }); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java index a247fcce07de..4df336319cf8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -13,57 +13,57 @@ */ public interface MachineRunCommands { /** - * The operation to get a run command. + * The operation to delete a run command. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param runCommandName The name of the run command. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Run Command along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String machineName, String runCommandName, - Context context); + void delete(String resourceGroupName, String machineName, String runCommandName); /** - * The operation to get a run command. + * The operation to delete a run command. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param runCommandName The name of the run command. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a Run Command. */ - MachineRunCommand get(String resourceGroupName, String machineName, String runCommandName); + void delete(String resourceGroupName, String machineName, String runCommandName, Context context); /** - * The operation to delete a run command. + * The operation to get a run command. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param runCommandName The name of the run command. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Run Command along with {@link Response}. */ - void delete(String resourceGroupName, String machineName, String runCommandName); + Response getWithResponse(String resourceGroupName, String machineName, String runCommandName, + Context context); /** - * The operation to delete a run command. + * The operation to get a run command. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param runCommandName The name of the run command. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Run Command. */ - void delete(String resourceGroupName, String machineName, String runCommandName, Context context); + MachineRunCommand get(String resourceGroupName, String machineName, String runCommandName); /** * The operation to get all the run commands of a non-Azure machine. @@ -73,7 +73,7 @@ Response getWithResponse(String resourceGroupName, String mac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineRunCommand items as paginated response with {@link PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String machineName); @@ -87,7 +87,7 @@ Response getWithResponse(String resourceGroupName, String mac * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of MachineRunCommand items as paginated response with {@link PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String machineName, String expand, Context context); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineRunCommandsListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandsListResult.java similarity index 63% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineRunCommandsListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandsListResult.java index f74f01d6bae2..392e2073f1ed 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineRunCommandsListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandsListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +14,28 @@ import java.util.List; /** - * Paged collection of MachineRunCommand items. + * Describes the Run Commands List Result. */ -@Immutable +@Fluent public final class MachineRunCommandsListResult implements JsonSerializable { /* - * The MachineRunCommand items on this page + * The list of run commands */ private List value; /* - * The link to the next page of items + * The uri to fetch the next page of run commands. Call ListNext() with this to fetch the next page of run commands. */ private String nextLink; /** * Creates an instance of MachineRunCommandsListResult class. */ - private MachineRunCommandsListResult() { + public MachineRunCommandsListResult() { } /** - * Get the value property: The MachineRunCommand items on this page. + * Get the value property: The list of run commands. * * @return the value value. */ @@ -44,7 +44,19 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Set the value property: The list of run commands. + * + * @param value the value value to set. + * @return the MachineRunCommandsListResult object itself. + */ + public MachineRunCommandsListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The uri to fetch the next page of run commands. Call ListNext() with this to fetch the + * next page of run commands. * * @return the nextLink value. */ @@ -52,6 +64,29 @@ public String nextLink() { return this.nextLink; } + /** + * Set the nextLink property: The uri to fetch the next page of run commands. Call ListNext() with this to fetch the + * next page of run commands. + * + * @param nextLink the nextLink value to set. + * @return the MachineRunCommandsListResult object itself. + */ + public MachineRunCommandsListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ @@ -69,7 +104,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of MachineRunCommandsListResult 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 MachineRunCommandsListResult. */ public static MachineRunCommandsListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineUpdate.java index 310306a5cc3a..1d0dfd278e33 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -288,6 +288,21 @@ public MachineUpdate withTpmEkCertificate(String tpmEkCertificate) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machines.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machines.java index a3feaefa4995..d55e3f1b7efb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machines.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machines.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,33 +12,6 @@ * Resource collection API of Machines. */ public interface Machines { - /** - * Retrieves information about the model view or the instance view of a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param expand The expand expression to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, - InstanceViewTypes expand, Context context); - - /** - * Retrieves information about the model view or the instance view of a hybrid machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 describes a hybrid machine. - */ - Machine getByResourceGroup(String resourceGroupName, String machineName); - /** * The operation to delete a hybrid machine. * @@ -63,57 +36,36 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Strin void delete(String resourceGroupName, String machineName, Context context); /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get - * the next page of hybrid machines. + * Retrieves information about the model view or the instance view of a hybrid machine. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param expand Expands referenced resources. + * @param machineName The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); - - /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a Machine list operation as paginated response with {@link PagedIterable}. + * @return describes a hybrid machine along with {@link Response}. */ - PagedIterable list(); + Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, + InstanceViewTypes expand, Context context); /** - * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the - * next page of hybrid machines. + * Retrieves information about the model view or the instance view of a hybrid machine. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the hybrid 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 response of a Machine list operation as paginated response with {@link PagedIterable}. + * @return describes a hybrid machine. */ - PagedIterable list(Context context); + Machine getByResourceGroup(String resourceGroupName, String machineName); /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -125,7 +77,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Strin /** * The operation to assess patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,7 +90,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, Strin /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +104,7 @@ MachineInstallPatchesResult installPatches(String resourceGroupName, String name /** * The operation to install patches on a hybrid machine identity in Azure. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. * @param context The context to associate with this operation. @@ -165,55 +117,50 @@ MachineInstallPatchesResult installPatches(String resourceGroupName, String name MachineInstallPatchesParameters installPatchesInput, Context context); /** - * Retrieves information about the model view or the instance view of a hybrid machine. + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. * - * @param id the resource ID. + * @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 describes a hybrid machine along with {@link Response}. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. */ - Machine getById(String id); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Retrieves information about the model view or the instance view of a hybrid machine. + * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get + * the next page of hybrid machines. * - * @param id the resource ID. - * @param expand The expand expression to apply on the operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param expand Expands referenced resources. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a hybrid machine along with {@link Response}. + * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. */ - Response getByIdWithResponse(String id, InstanceViewTypes expand, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context); /** - * The operation to delete a hybrid machine. + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. * - * @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 List hybrid machine operation response as paginated response with {@link PagedIterable}. */ - void deleteById(String id); + PagedIterable list(); /** - * The operation to delete a hybrid machine. + * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the + * next page of hybrid machines. * - * @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 List hybrid machine operation response as paginated response with {@link PagedIterable}. */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Machine resource. - * - * @param name resource name. - * @return the first stage of the new Machine definition. - */ - Machine.DefinitionStages.Blank define(String name); + PagedIterable list(Context context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkInterface.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkInterface.java index 60097065a130..cffad236fc56 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkInterface.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkInterface.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Describes a network interface. */ -@Immutable +@Fluent public final class NetworkInterface implements JsonSerializable { /* * Represents MAC address of the network interface. @@ -40,7 +40,7 @@ public final class NetworkInterface implements JsonSerializable ipAddresses() { return this.ipAddresses; } + /** + * Set the ipAddresses property: The list of IP addresses in this interface. + * + * @param ipAddresses the ipAddresses value to set. + * @return the NetworkInterface object itself. + */ + public NetworkInterface withIpAddresses(List ipAddresses) { + this.ipAddresses = ipAddresses; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipAddresses() != null) { + ipAddresses().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ @@ -88,6 +143,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("macAddress", this.macAddress); jsonWriter.writeStringField("id", this.id); jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("ipAddresses", this.ipAddresses, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfile.java index a1576f3721c8..173807987ec3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfile.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfiles.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfiles.java index 45d1be6d90ca..8b286df841f7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfiles.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfiles.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeter.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeter.java index f35abebaeb2f..f381617f936d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeter.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -34,7 +34,7 @@ public final class NetworkSecurityPerimeter implements JsonSerializable { /* - * The NetworkSecurityPerimeterConfiguration items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of NetworkSecurityPerimeterConfigurationListResult class. */ - private NetworkSecurityPerimeterConfigurationListResult() { + public NetworkSecurityPerimeterConfigurationListResult() { } /** - * Get the value property: The NetworkSecurityPerimeterConfiguration items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -53,14 +53,23 @@ 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(); } @@ -70,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of NetworkSecurityPerimeterConfigurationListResult 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 NetworkSecurityPerimeterConfigurationListResult. */ public static NetworkSecurityPerimeterConfigurationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurationReconcileResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurationReconcileResult.java index de8b476f94c8..8b269ce1c346 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurationReconcileResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurationReconcileResult.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurations.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurations.java index 0d1afeb49dc1..f8154dcf8188 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurations.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -51,8 +51,7 @@ NetworkSecurityPerimeterConfiguration getByPrivateLinkScope(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a NetworkSecurityPerimeterConfiguration list operation as paginated response with - * {@link PagedIterable}. + * @return a list of network security perimeter configurations as paginated response with {@link PagedIterable}. */ PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName); @@ -66,8 +65,7 @@ PagedIterable listByPrivateLinkScope(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 response of a NetworkSecurityPerimeterConfiguration list operation as paginated response with - * {@link PagedIterable}. + * @return a list of network security perimeter configurations as paginated response with {@link PagedIterable}. */ PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, Context context); @@ -82,7 +80,7 @@ PagedIterable listByPrivateLinkScope(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 response. + * @return result of network security perimeter configurations. */ NetworkSecurityPerimeterConfigurationReconcileResult reconcileForPrivateLinkScope(String resourceGroupName, String scopeName, String perimeterName); @@ -98,7 +96,7 @@ NetworkSecurityPerimeterConfigurationReconcileResult reconcileForPrivateLinkScop * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. + * @return result of network security perimeter configurations. */ NetworkSecurityPerimeterConfigurationReconcileResult reconcileForPrivateLinkScope(String resourceGroupName, String scopeName, String perimeterName, Context context); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterProfile.java index 983a6be3afe9..48ce5fa81400 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterProfile.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -45,7 +45,7 @@ public final class NetworkSecurityPerimeterProfile implements JsonSerializable enabledLogCategories() { return this.enabledLogCategories; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (accessRules() != null) { + accessRules().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfile.java index cbd455af3b39..8275c6c51886 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfile.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -86,6 +86,20 @@ public OSProfile withLinuxConfiguration(OSProfileLinuxConfiguration linuxConfigu return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (windowsConfiguration() != null) { + windowsConfiguration().validate(); + } + if (linuxConfiguration() != null) { + linuxConfiguration().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileLinuxConfiguration.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileLinuxConfiguration.java index 238fe92c9c53..84b821512fab 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileLinuxConfiguration.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileLinuxConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -117,6 +117,17 @@ public PatchSettingsStatus status() { return this.innerPatchSettings() == null ? null : this.innerPatchSettings().status(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerPatchSettings() != null) { + innerPatchSettings().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileWindowsConfiguration.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileWindowsConfiguration.java index 5f0cfcb35363..65db8cdec87d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileWindowsConfiguration.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileWindowsConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -117,6 +117,17 @@ public PatchSettingsStatus status() { return this.innerPatchSettings() == null ? null : this.innerPatchSettings().status(); } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerPatchSettings() != null) { + innerPatchSettings().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/OperationListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationListResult.java similarity index 76% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/OperationListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationListResult.java index fff320a23923..7721870b22b8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/OperationListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -14,28 +14,23 @@ import java.util.List; /** - * The List of Operations. + * The List Compute Operation operation response. */ @Immutable public final class OperationListResult implements JsonSerializable { /* - * The list of operations. + * The list of compute operations */ private List value; - /* - * The URL to get the next set of results. - */ - private String nextLink; - /** * Creates an instance of OperationListResult class. */ - private OperationListResult() { + public OperationListResult() { } /** - * Get the value property: The list of operations. + * Get the value property: The list of compute operations. * * @return the value value. */ @@ -44,12 +39,14 @@ public List value() { } /** - * Get the nextLink property: The URL to get the next set of results. + * Validates the instance. * - * @return the nextLink value. + * @throws IllegalArgumentException thrown if the instance is not valid. */ - public String nextLink() { - return this.nextLink; + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } } /** @@ -80,8 +77,6 @@ public static OperationListResult fromJson(JsonReader jsonReader) throws IOExcep List value = reader.readArray(reader1 -> OperationValueInner.fromJson(reader1)); deserializedOperationListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOperationListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValue.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValue.java index 6690bd3ff006..41a944525663 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValue.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValue.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValueDisplay.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValueDisplay.java index 0ec59591af19..1c8acc441153 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValueDisplay.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValueDisplay.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -39,7 +39,7 @@ public final class OperationValueDisplay implements JsonSerializable { /** - * Windows. + * Static value Windows for OsType. */ public static final OsType WINDOWS = fromString("Windows"); /** - * Linux. + * Static value Linux for OsType. */ public static final OsType LINUX = fromString("Linux"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchModeTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchModeTypes.java index 638f372140a5..d73c47f6c576 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchModeTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchModeTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,22 +12,22 @@ */ public final class PatchModeTypes extends ExpandableStringEnum { /** - * ImageDefault. + * Static value ImageDefault for PatchModeTypes. */ public static final PatchModeTypes IMAGE_DEFAULT = fromString("ImageDefault"); /** - * AutomaticByPlatform. + * Static value AutomaticByPlatform for PatchModeTypes. */ public static final PatchModeTypes AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); /** - * AutomaticByOS. + * Static value AutomaticByOS for PatchModeTypes. */ public static final PatchModeTypes AUTOMATIC_BY_OS = fromString("AutomaticByOS"); /** - * Manual. + * Static value Manual for PatchModeTypes. */ public static final PatchModeTypes MANUAL = fromString("Manual"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStartedBy.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStartedBy.java index 6bbe3e36369e..edf26bfab4af 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStartedBy.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStartedBy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class PatchOperationStartedBy extends ExpandableStringEnum { /** - * User. + * Static value User for PatchOperationStartedBy. */ public static final PatchOperationStartedBy USER = fromString("User"); /** - * Platform. + * Static value Platform for PatchOperationStartedBy. */ public static final PatchOperationStartedBy PLATFORM = fromString("Platform"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStatus.java index 0ac048828ade..bb63afaddcb9 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -13,27 +13,27 @@ */ public final class PatchOperationStatus extends ExpandableStringEnum { /** - * Unknown. + * Static value Unknown for PatchOperationStatus. */ public static final PatchOperationStatus UNKNOWN = fromString("Unknown"); /** - * InProgress. + * Static value InProgress for PatchOperationStatus. */ public static final PatchOperationStatus IN_PROGRESS = fromString("InProgress"); /** - * Failed. + * Static value Failed for PatchOperationStatus. */ public static final PatchOperationStatus FAILED = fromString("Failed"); /** - * Succeeded. + * Static value Succeeded for PatchOperationStatus. */ public static final PatchOperationStatus SUCCEEDED = fromString("Succeeded"); /** - * CompletedWithWarnings. + * Static value CompletedWithWarnings for PatchOperationStatus. */ public static final PatchOperationStatus COMPLETED_WITH_WARNINGS = fromString("CompletedWithWarnings"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchServiceUsed.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchServiceUsed.java index 4ebc9137874f..ed93cf2a0545 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchServiceUsed.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchServiceUsed.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,32 +12,32 @@ */ public final class PatchServiceUsed extends ExpandableStringEnum { /** - * Unknown. + * Static value Unknown for PatchServiceUsed. */ public static final PatchServiceUsed UNKNOWN = fromString("Unknown"); /** - * WU. + * Static value WU for PatchServiceUsed. */ public static final PatchServiceUsed WU = fromString("WU"); /** - * WU_WSUS. + * Static value WU_WSUS for PatchServiceUsed. */ public static final PatchServiceUsed WU_WSUS = fromString("WU_WSUS"); /** - * YUM. + * Static value YUM for PatchServiceUsed. */ public static final PatchServiceUsed YUM = fromString("YUM"); /** - * APT. + * Static value APT for PatchServiceUsed. */ public static final PatchServiceUsed APT = fromString("APT"); /** - * Zypper. + * Static value Zypper for PatchServiceUsed. */ public static final PatchServiceUsed ZYPPER = fromString("Zypper"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchSettingsStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchSettingsStatus.java index 62dfe644b31f..be47717236d9 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchSettingsStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchSettingsStatus.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.core.management.exception.ManagementError; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -15,7 +15,7 @@ /** * Status of the hotpatch capability enrollment or disenrollment. */ -@Immutable +@Fluent public final class PatchSettingsStatus implements JsonSerializable { /* * Indicates the current status of the hotpatch being enabled or disabled. @@ -30,7 +30,7 @@ public final class PatchSettingsStatus implements JsonSerializable { /* * The ARM Resource Id of the Private Endpoint. @@ -39,7 +39,7 @@ public final class PrivateEndpointConnectionDataModel implements JsonSerializabl /** * Creates an instance of PrivateEndpointConnectionDataModel class. */ - private PrivateEndpointConnectionDataModel() { + public PrivateEndpointConnectionDataModel() { } /** @@ -78,6 +78,28 @@ public PrivateEndpointConnectionProperties properties() { return this.properties; } + /** + * Set the properties property: The Private Endpoint Connection properties. + * + * @param properties the properties value to set. + * @return the PrivateEndpointConnectionDataModel object itself. + */ + public PrivateEndpointConnectionDataModel withProperties(PrivateEndpointConnectionProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/PrivateEndpointConnectionListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionListResult.java similarity index 78% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/PrivateEndpointConnectionListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionListResult.java index 4962d17abdb4..7d573f565a0d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/PrivateEndpointConnectionListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -14,29 +14,29 @@ import java.util.List; /** - * The response of a PrivateEndpointConnection list operation. + * A list of private endpoint connections. */ @Immutable public final class PrivateEndpointConnectionListResult implements JsonSerializable { /* - * The PrivateEndpointConnection items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of PrivateEndpointConnectionListResult class. */ - private PrivateEndpointConnectionListResult() { + public PrivateEndpointConnectionListResult() { } /** - * Get the value property: The PrivateEndpointConnection items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -45,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -53,14 +53,23 @@ 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(); } @@ -70,7 +79,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateEndpointConnectionListResult 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 PrivateEndpointConnectionListResult. */ public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionProperties.java index e47be60b9ca9..3988fa43203a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -103,6 +103,20 @@ public List groupIds() { return this.groupIds; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnections.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnections.java index d9f1f8d3ccd0..2c31215d788b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnections.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnections.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointProperty.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointProperty.java index 6e9880c90341..5b79d0674795 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointProperty.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointProperty.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -47,6 +47,14 @@ public PrivateEndpointProperty withId(String id) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResource.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResource.java index d29619328681..553ebb24c27f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResource.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/PrivateLinkResourceListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceListResult.java similarity index 78% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/PrivateLinkResourceListResult.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceListResult.java index 23b6afb23934..8e9aa39f4a03 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/PrivateLinkResourceListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.hybridcompute.implementation.models; +package com.azure.resourcemanager.hybridcompute.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -14,28 +14,28 @@ import java.util.List; /** - * The response of a PrivateLinkResource list operation. + * A list of private link resources. */ @Immutable public final class PrivateLinkResourceListResult implements JsonSerializable { /* - * The PrivateLinkResource items on this page + * Array of results. */ private List value; /* - * The link to the next page of items + * Link to retrieve next page of results. */ private String nextLink; /** * Creates an instance of PrivateLinkResourceListResult class. */ - private PrivateLinkResourceListResult() { + public PrivateLinkResourceListResult() { } /** - * Get the value property: The PrivateLinkResource items on this page. + * Get the value property: Array of results. * * @return the value value. */ @@ -44,7 +44,7 @@ public List value() { } /** - * Get the nextLink property: The link to the next page of items. + * Get the nextLink property: Link to retrieve next page of results. * * @return the nextLink value. */ @@ -52,14 +52,23 @@ 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(); } @@ -69,7 +78,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateLinkResourceListResult 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 PrivateLinkResourceListResult. */ public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceProperties.java index 2c3fe7f97191..c4e0932de7c3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -35,7 +35,7 @@ public final class PrivateLinkResourceProperties implements JsonSerializable requiredZoneNames() { return this.requiredZoneNames; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResources.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResources.java index 775985049607..dec4aed06e6d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResources.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResources.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -17,55 +17,55 @@ public interface PrivateLinkResources { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param groupName The name of the private link 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with - * {@link Response}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated + * response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String scopeName, String groupName, - Context context); + PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param groupName The name of the private link 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated + * response with {@link PagedIterable}. */ - PrivateLinkResource get(String resourceGroupName, String scopeName, String groupName); + PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. + * @param groupName The name of the private link 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 the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link Response}. */ - PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName); + Response getWithResponse(String resourceGroupName, String scopeName, String groupName, + Context context); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. - * @param context The context to associate with this operation. + * @param groupName The name of the private link 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 private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope. */ - PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, - Context context); + PrivateLinkResource get(String resourceGroupName, String scopeName, String groupName); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopeValidationDetails.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopeValidationDetails.java index 8c3207b626c5..23a8a269b802 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopeValidationDetails.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopeValidationDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopes.java index 71970a633d90..92e49b102d25 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -13,56 +13,51 @@ */ public interface PrivateLinkScopes { /** - * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 response body along with {@link Response}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ - Response getValidationDetailsForMachineWithResponse(String resourceGroupName, - String machineName, Context context); + PagedIterable list(); /** - * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. + * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid 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 response. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ - PrivateLinkScopeValidationDetails getValidationDetailsForMachine(String resourceGroupName, String machineName); + PagedIterable list(Context context); /** - * Returns a Azure Arc PrivateLinkScope. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Arc PrivateLinkScope 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 an Azure Arc PrivateLinkScope definition along with {@link Response}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String scopeName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Returns a Azure Arc PrivateLinkScope. + * Gets a list of Azure Arc PrivateLinkScopes within a resource group. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param scopeName The name of the Azure Arc PrivateLinkScope 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 an Azure Arc PrivateLinkScope definition. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ - HybridComputePrivateLinkScope getByResourceGroup(String resourceGroupName, String scopeName); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Deletes a Azure Arc PrivateLinkScope. @@ -88,77 +83,82 @@ Response getByResourceGroupWithResponse(String re void delete(String resourceGroupName, String scopeName, Context context); /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Returns a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param scopeName The name of the Azure Arc PrivateLinkScope 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 a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with - * {@link PagedIterable}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + Response getByResourceGroupWithResponse(String resourceGroupName, String scopeName, + Context context); /** - * Gets a list of Azure Arc PrivateLinkScopes within a resource group. + * Returns a Azure Arc PrivateLinkScope. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. + * @param scopeName The name of the Azure Arc PrivateLinkScope 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 a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with - * {@link PagedIterable}. + * @return an Azure Arc PrivateLinkScope definition. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + HybridComputePrivateLinkScope getByResourceGroup(String resourceGroupName, String scopeName); /** - * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * Returns a Azure Arc PrivateLinkScope's validation details. * + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope 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 a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with - * {@link PagedIterable}. + * @return the response body along with {@link Response}. */ - PagedIterable list(); + Response getValidationDetailsWithResponse(String location, + String privateLinkScopeId, Context context); /** - * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. + * Returns a Azure Arc PrivateLinkScope's validation details. * - * @param context The context to associate with this operation. + * @param location The location of the target resource. + * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope 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 a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with - * {@link PagedIterable}. + * @return the response. */ - PagedIterable list(Context context); + PrivateLinkScopeValidationDetails getValidationDetails(String location, String privateLinkScopeId); /** - * Returns a Azure Arc PrivateLinkScope's validation details. + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * - * @param location The name of the Azure region. - * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details for. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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}. */ - Response getValidationDetailsWithResponse(String location, - String privateLinkScopeId, Context context); + Response getValidationDetailsForMachineWithResponse(String resourceGroupName, + String machineName, Context context); /** - * Returns a Azure Arc PrivateLinkScope's validation details. + * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. * - * @param location The name of the Azure region. - * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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. */ - PrivateLinkScopeValidationDetails getValidationDetails(String location, String privateLinkScopeId); + PrivateLinkScopeValidationDetails getValidationDetailsForMachine(String resourceGroupName, String machineName); /** * Returns a Azure Arc PrivateLinkScope. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopesResource.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopesResource.java new file mode 100644 index 000000000000..735f467c5a67 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopesResource.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hybridcompute.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * An azure resource object. + */ +@Fluent +public class PrivateLinkScopesResource extends Resource { + /* + * 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 PrivateLinkScopesResource class. + */ + public PrivateLinkScopesResource() { + } + + /** + * 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 PrivateLinkScopesResource withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public PrivateLinkScopesResource withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkScopesResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkScopesResource 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 PrivateLinkScopesResource. + */ + public static PrivateLinkScopesResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkScopesResource deserializedPrivateLinkScopesResource = new PrivateLinkScopesResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkScopesResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkScopesResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkScopesResource.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedPrivateLinkScopesResource.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPrivateLinkScopesResource.withTags(tags); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkScopesResource; + }); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkServiceConnectionStateProperty.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkServiceConnectionStateProperty.java index 06975ff4ccdc..e54b9cea72be 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkServiceConnectionStateProperty.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkServiceConnectionStateProperty.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.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; @@ -87,6 +88,26 @@ public String actionsRequired() { return this.actionsRequired; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property status in model PrivateLinkServiceConnectionStateProperty")); + } + if (description() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model PrivateLinkServiceConnectionStateProperty")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkServiceConnectionStateProperty.class); + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Processor.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Processor.java index dbc5634e2e9b..0389cf97e5e0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Processor.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Processor.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -29,7 +29,7 @@ public final class Processor implements JsonSerializable { /** * Creates an instance of Processor class. */ - private Processor() { + public Processor() { } /** @@ -50,6 +50,14 @@ public Integer numberOfCores() { return this.numberOfCores; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeature.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeature.java index d96d42441913..ecb9d1ecd677 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeature.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeature.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -145,6 +145,14 @@ public ManagementError error() { return this.error; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeatureUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeatureUpdate.java index ab09b822ebd8..6458ff9ed184 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeatureUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeatureUpdate.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -72,6 +72,14 @@ public ProductFeatureUpdate withSubscriptionStatus(LicenseProfileSubscriptionSta return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProgramYear.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProgramYear.java index 6e68df632c83..18c0d839da4e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProgramYear.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProgramYear.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,17 +12,17 @@ */ public final class ProgramYear extends ExpandableStringEnum { /** - * Year 1. + * Static value Year 1 for ProgramYear. */ public static final ProgramYear YEAR_1 = fromString("Year 1"); /** - * Year 2. + * Static value Year 2 for ProgramYear. */ public static final ProgramYear YEAR_2 = fromString("Year 2"); /** - * Year 3. + * Static value Year 3 for ProgramYear. */ public static final ProgramYear YEAR_3 = fromString("Year 3"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssue.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssue.java index 5efe4de9b6b1..1e88577c6b45 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssue.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssue.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -31,7 +31,7 @@ public final class ProvisioningIssue implements JsonSerializable suggestedAccessRules() { return this.innerProperties() == null ? null : this.innerProperties().suggestedAccessRules(); } + /** + * 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/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueSeverity.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueSeverity.java index df5aace4e661..fa9377212fcf 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueSeverity.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueSeverity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,12 +12,12 @@ */ public final class ProvisioningIssueSeverity extends ExpandableStringEnum { /** - * Warnings can cause connectivity issues after provisioning succeeds. + * Static value Warning for ProvisioningIssueSeverity. */ public static final ProvisioningIssueSeverity WARNING = fromString("Warning"); /** - * Errors will cause association provisioning to fail. + * Static value Error for ProvisioningIssueSeverity. */ public static final ProvisioningIssueSeverity ERROR = fromString("Error"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueType.java index 9f9423e973a4..54bc150ff718 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,25 +12,25 @@ */ public final class ProvisioningIssueType extends ExpandableStringEnum { /** - * Perimeter configuration is missing. + * Static value MissingPerimeterConfiguration for ProvisioningIssueType. */ public static final ProvisioningIssueType MISSING_PERIMETER_CONFIGURATION = fromString("MissingPerimeterConfiguration"); /** - * Identity configuration is missing. + * Static value MissingIdentityConfiguration for ProvisioningIssueType. */ public static final ProvisioningIssueType MISSING_IDENTITY_CONFIGURATION = fromString("MissingIdentityConfiguration"); /** - * Configuration failed to propagate. + * Static value ConfigurationPropagationFailure for ProvisioningIssueType. */ public static final ProvisioningIssueType CONFIGURATION_PROPAGATION_FAILURE = fromString("ConfigurationPropagationFailure"); /** - * Other failure. + * Static value Other for ProvisioningIssueType. */ public static final ProvisioningIssueType OTHER = fromString("Other"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningState.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningState.java index 05112de106fb..b7c6047daf8e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningState.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,42 +12,42 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Creating. + * Static value Creating for ProvisioningState. */ public static final ProvisioningState CREATING = fromString("Creating"); /** - * Updating. + * Static value Updating for ProvisioningState. */ public static final ProvisioningState UPDATING = fromString("Updating"); /** - * Deleting. + * Static value Deleting for ProvisioningState. */ public static final ProvisioningState DELETING = fromString("Deleting"); /** - * Succeeded. + * Static value Succeeded for ProvisioningState. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Failed. + * Static value Failed for ProvisioningState. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Accepted. + * Static value Accepted for ProvisioningState. */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); /** - * Canceled. + * Static value Canceled for ProvisioningState. */ public static final ProvisioningState CANCELED = fromString("Canceled"); /** - * Deleted. + * Static value Deleted for ProvisioningState. */ public static final ProvisioningState DELETED = fromString("Deleted"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PublicNetworkAccessType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PublicNetworkAccessType.java index 2ff433492c1d..10f1adc35aed 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PublicNetworkAccessType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PublicNetworkAccessType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -13,16 +13,20 @@ */ public final class PublicNetworkAccessType extends ExpandableStringEnum { /** - * Allows Azure Arc agents to communicate with Azure Arc services over both public (internet) and private endpoints. + * Static value Enabled for PublicNetworkAccessType. */ public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); /** - * Does not allow Azure Arc agents to communicate with Azure Arc services over public (internet) endpoints. The - * agents must use the private link. + * Static value Disabled for PublicNetworkAccessType. */ public static final PublicNetworkAccessType DISABLED = fromString("Disabled"); + /** + * Static value SecuredByPerimeter for PublicNetworkAccessType. + */ + public static final PublicNetworkAccessType SECURED_BY_PERIMETER = fromString("SecuredByPerimeter"); + /** * Creates a new instance of PublicNetworkAccessType value. * diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceAssociation.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceAssociation.java index 9e7b121f2414..5415b735c768 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceAssociation.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceAssociation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -29,7 +29,7 @@ public final class ResourceAssociation implements JsonSerializable tags) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandInputParameter.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandInputParameter.java index fff0dfe01dd8..c19608b55b2b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandInputParameter.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandInputParameter.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.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; @@ -72,6 +73,24 @@ public RunCommandInputParameter withValue(String value) { 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 RunCommandInputParameter")); + } + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model RunCommandInputParameter")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RunCommandInputParameter.class); + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandManagedIdentity.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandManagedIdentity.java index 7ce8aba24be6..8638f8f44ca7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandManagedIdentity.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandManagedIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -82,6 +82,14 @@ public RunCommandManagedIdentity withObjectId(String objectId) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceExtension.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceExtension.java deleted file mode 100644 index 5ca2731118d3..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceExtension.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.BinaryData; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Enable private link validation for an Azure Arc Extension. - */ -@Fluent -public final class ServiceExtension implements JsonSerializable { - /* - * The name of the Azure Arc Extension. - */ - private BinaryData serviceExtensionType; - - /* - * The network access policy to determine if the specified Azure Arc Extension can use public Azure Arc Extension - * service endpoints. - */ - private ServiceExtensionPublicNetworkAccess serviceExtensionPublicNetworkAccess; - - /** - * Creates an instance of ServiceExtension class. - */ - public ServiceExtension() { - } - - /** - * Get the serviceExtensionType property: The name of the Azure Arc Extension. - * - * @return the serviceExtensionType value. - */ - public BinaryData serviceExtensionType() { - return this.serviceExtensionType; - } - - /** - * Set the serviceExtensionType property: The name of the Azure Arc Extension. - * - * @param serviceExtensionType the serviceExtensionType value to set. - * @return the ServiceExtension object itself. - */ - public ServiceExtension withServiceExtensionType(BinaryData serviceExtensionType) { - this.serviceExtensionType = serviceExtensionType; - return this; - } - - /** - * Get the serviceExtensionPublicNetworkAccess property: The network access policy to determine if the specified - * Azure Arc Extension can use public Azure Arc Extension service endpoints. - * - * @return the serviceExtensionPublicNetworkAccess value. - */ - public ServiceExtensionPublicNetworkAccess serviceExtensionPublicNetworkAccess() { - return this.serviceExtensionPublicNetworkAccess; - } - - /** - * Set the serviceExtensionPublicNetworkAccess property: The network access policy to determine if the specified - * Azure Arc Extension can use public Azure Arc Extension service endpoints. - * - * @param serviceExtensionPublicNetworkAccess the serviceExtensionPublicNetworkAccess value to set. - * @return the ServiceExtension object itself. - */ - public ServiceExtension withServiceExtensionPublicNetworkAccess( - ServiceExtensionPublicNetworkAccess serviceExtensionPublicNetworkAccess) { - this.serviceExtensionPublicNetworkAccess = serviceExtensionPublicNetworkAccess; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - if (this.serviceExtensionType != null) { - jsonWriter.writeFieldName("serviceExtensionType"); - this.serviceExtensionType.writeTo(jsonWriter); - } - jsonWriter.writeStringField("serviceExtensionPublicNetworkAccess", - this.serviceExtensionPublicNetworkAccess == null - ? null - : this.serviceExtensionPublicNetworkAccess.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceExtension from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceExtension 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 ServiceExtension. - */ - public static ServiceExtension fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceExtension deserializedServiceExtension = new ServiceExtension(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceExtensionType".equals(fieldName)) { - deserializedServiceExtension.serviceExtensionType - = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())); - } else if ("serviceExtensionPublicNetworkAccess".equals(fieldName)) { - deserializedServiceExtension.serviceExtensionPublicNetworkAccess - = ServiceExtensionPublicNetworkAccess.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedServiceExtension; - }); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceExtensionPublicNetworkAccess.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceExtensionPublicNetworkAccess.java deleted file mode 100644 index 15ca836a0d15..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceExtensionPublicNetworkAccess.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The network access policy to determine if the specified Azure Arc Extension can use public Azure Arc Extension - * service endpoints. - */ -public final class ServiceExtensionPublicNetworkAccess - extends ExpandableStringEnum { - /** - * Allows Azure Arc Extension agents to communicate with Azure Arc services over both public (internet) and private - * endpoints. - */ - public static final ServiceExtensionPublicNetworkAccess ENABLED = fromString("Enabled"); - - /** - * Does not allow Azure Arc Extension agents to communicate with Azure Arc services over public (internet) - * endpoints. The agents must use the private link. - */ - public static final ServiceExtensionPublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ServiceExtensionPublicNetworkAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServiceExtensionPublicNetworkAccess() { - } - - /** - * Creates or finds a ServiceExtensionPublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServiceExtensionPublicNetworkAccess. - */ - public static ServiceExtensionPublicNetworkAccess fromString(String name) { - return fromString(name, ServiceExtensionPublicNetworkAccess.class); - } - - /** - * Gets known ServiceExtensionPublicNetworkAccess values. - * - * @return known ServiceExtensionPublicNetworkAccess values. - */ - public static Collection values() { - return values(ServiceExtensionPublicNetworkAccess.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatus.java index db7bd1b0d576..63651422588c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -72,6 +72,14 @@ public ServiceStatus withStartupType(String startupType) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatuses.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatuses.java index 97cdb327f2b3..0473f8e14eeb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatuses.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatuses.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -74,6 +74,20 @@ public ServiceStatuses withGuestConfigurationService(ServiceStatus guestConfigur return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (extensionService() != null) { + extensionService().validate(); + } + if (guestConfigurationService() != null) { + guestConfigurationService().validate(); + } + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Settings.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Settings.java index 2485a83c124d..ff24798c00e0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Settings.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Settings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SettingsOperations.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SettingsOperations.java index 480f148dc9f2..4185c40882fe 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SettingsOperations.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SettingsOperations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -24,8 +24,7 @@ public interface SettingsOperations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. + * @return the response body along with {@link Response}. */ Response getWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, Context context); @@ -41,7 +40,7 @@ Response getWithResponse(String resourceGroupName, String baseProvider * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + * @return the response. */ Settings get(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName); @@ -59,8 +58,7 @@ Settings get(String resourceGroupName, String baseProvider, String baseResourceT * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. + * @return the response body along with {@link Response}. */ Response updateWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context); @@ -77,7 +75,7 @@ Response updateWithResponse(String resourceGroupName, String baseProvi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + * @return the response. */ Settings update(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters); @@ -95,8 +93,7 @@ Settings update(String resourceGroupName, String baseProvider, String baseResour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type along - * with {@link Response}. + * @return the response body along with {@link Response}. */ Response patchWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context); @@ -113,7 +110,7 @@ Response patchWithResponse(String resourceGroupName, String baseProvid * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return concrete proxy resource types can be created by aliasing this type using a specific property type. + * @return the response. */ Settings patch(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SetupExtensionRequest.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SetupExtensionRequest.java index 5d3166926c76..39c3f59a6efb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SetupExtensionRequest.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SetupExtensionRequest.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusLevelTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusLevelTypes.java index 4338d7628028..bf98eaa6d46b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusLevelTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusLevelTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,17 +12,17 @@ */ public final class StatusLevelTypes extends ExpandableStringEnum { /** - * Info. + * Static value Info for StatusLevelTypes. */ public static final StatusLevelTypes INFO = fromString("Info"); /** - * Warning. + * Static value Warning for StatusLevelTypes. */ public static final StatusLevelTypes WARNING = fromString("Warning"); /** - * Error. + * Static value Error for StatusLevelTypes. */ public static final StatusLevelTypes ERROR = fromString("Error"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusTypes.java index cc913de04923..f5f6a39d2bb6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,22 +12,22 @@ */ public final class StatusTypes extends ExpandableStringEnum { /** - * Connected. + * Static value Connected for StatusTypes. */ public static final StatusTypes CONNECTED = fromString("Connected"); /** - * Disconnected. + * Static value Disconnected for StatusTypes. */ public static final StatusTypes DISCONNECTED = fromString("Disconnected"); /** - * Error. + * Static value Error for StatusTypes. */ public static final StatusTypes ERROR = fromString("Error"); /** - * AwaitingConnection. + * Static value AwaitingConnection for StatusTypes. */ public static final StatusTypes AWAITING_CONNECTION = fromString("AwaitingConnection"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StorageProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StorageProfile.java index 60f211db9d58..9b983bd86e01 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StorageProfile.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StorageProfile.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Describes the storage configuration of the machine. */ -@Immutable +@Fluent public final class StorageProfile implements JsonSerializable { /* * The disks on the machine. @@ -25,7 +25,7 @@ public final class StorageProfile implements JsonSerializable { /** * Creates an instance of StorageProfile class. */ - private StorageProfile() { + public StorageProfile() { } /** @@ -37,12 +37,35 @@ public List disks() { return this.disks; } + /** + * Set the disks property: The disks on the machine. + * + * @param disks the disks value to set. + * @return the StorageProfile object itself. + */ + public StorageProfile withDisks(List disks) { + this.disks = disks; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (disks() != null) { + disks().forEach(e -> e.validate()); + } + } + /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("disks", this.disks, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Subnet.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Subnet.java index 1e9bab3d18dd..922e8c3f3490 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Subnet.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Subnet.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Describes the subnet. */ -@Immutable +@Fluent public final class Subnet implements JsonSerializable { /* * Represents address prefix. @@ -24,7 +24,7 @@ public final class Subnet implements JsonSerializable { /** * Creates an instance of Subnet class. */ - private Subnet() { + public Subnet() { } /** @@ -36,6 +36,25 @@ public String addressPrefix() { return this.addressPrefix; } + /** + * Set the addressPrefix property: Represents address prefix. + * + * @param addressPrefix the addressPrefix value to set. + * @return the Subnet object itself. + */ + public Subnet withAddressPrefix(String addressPrefix) { + this.addressPrefix = addressPrefix; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/TagsResource.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/TagsResource.java index 28b3b03f46aa..105699dbce11 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/TagsResource.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/TagsResource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -49,6 +49,14 @@ public TagsResource 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/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationLinux.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationLinux.java index 4d53d6c9c302..844104adb4ae 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationLinux.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationLinux.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,17 +12,17 @@ */ public final class VMGuestPatchClassificationLinux extends ExpandableStringEnum { /** - * Critical. + * Static value Critical for VMGuestPatchClassificationLinux. */ public static final VMGuestPatchClassificationLinux CRITICAL = fromString("Critical"); /** - * Security. + * Static value Security for VMGuestPatchClassificationLinux. */ public static final VMGuestPatchClassificationLinux SECURITY = fromString("Security"); /** - * Other. + * Static value Other for VMGuestPatchClassificationLinux. */ public static final VMGuestPatchClassificationLinux OTHER = fromString("Other"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationWindows.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationWindows.java index 7d82c817c2ac..c127f279e6cb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationWindows.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationWindows.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,42 +12,42 @@ */ public final class VMGuestPatchClassificationWindows extends ExpandableStringEnum { /** - * Critical. + * Static value Critical for VMGuestPatchClassificationWindows. */ public static final VMGuestPatchClassificationWindows CRITICAL = fromString("Critical"); /** - * Security. + * Static value Security for VMGuestPatchClassificationWindows. */ public static final VMGuestPatchClassificationWindows SECURITY = fromString("Security"); /** - * UpdateRollUp. + * Static value UpdateRollUp for VMGuestPatchClassificationWindows. */ public static final VMGuestPatchClassificationWindows UPDATE_ROLL_UP = fromString("UpdateRollUp"); /** - * FeaturePack. + * Static value FeaturePack for VMGuestPatchClassificationWindows. */ public static final VMGuestPatchClassificationWindows FEATURE_PACK = fromString("FeaturePack"); /** - * ServicePack. + * Static value ServicePack for VMGuestPatchClassificationWindows. */ public static final VMGuestPatchClassificationWindows SERVICE_PACK = fromString("ServicePack"); /** - * Definition. + * Static value Definition for VMGuestPatchClassificationWindows. */ public static final VMGuestPatchClassificationWindows DEFINITION = fromString("Definition"); /** - * Tools. + * Static value Tools for VMGuestPatchClassificationWindows. */ public static final VMGuestPatchClassificationWindows TOOLS = fromString("Tools"); /** - * Updates. + * Static value Updates for VMGuestPatchClassificationWindows. */ public static final VMGuestPatchClassificationWindows UPDATES = fromString("Updates"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootSetting.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootSetting.java index 2d65bd711a08..0080483a0f2a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootSetting.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootSetting.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,17 +12,17 @@ */ public final class VMGuestPatchRebootSetting extends ExpandableStringEnum { /** - * IfRequired. + * Static value IfRequired for VMGuestPatchRebootSetting. */ public static final VMGuestPatchRebootSetting IF_REQUIRED = fromString("IfRequired"); /** - * Never. + * Static value Never for VMGuestPatchRebootSetting. */ public static final VMGuestPatchRebootSetting NEVER = fromString("Never"); /** - * Always. + * Static value Always for VMGuestPatchRebootSetting. */ public static final VMGuestPatchRebootSetting ALWAYS = fromString("Always"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootStatus.java index c5c0f4ed6c1d..acbf6e20c03f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -12,32 +12,32 @@ */ public final class VMGuestPatchRebootStatus extends ExpandableStringEnum { /** - * Unknown. + * Static value Unknown for VMGuestPatchRebootStatus. */ public static final VMGuestPatchRebootStatus UNKNOWN = fromString("Unknown"); /** - * NotNeeded. + * Static value NotNeeded for VMGuestPatchRebootStatus. */ public static final VMGuestPatchRebootStatus NOT_NEEDED = fromString("NotNeeded"); /** - * Required. + * Static value Required for VMGuestPatchRebootStatus. */ public static final VMGuestPatchRebootStatus REQUIRED = fromString("Required"); /** - * Started. + * Static value Started for VMGuestPatchRebootStatus. */ public static final VMGuestPatchRebootStatus STARTED = fromString("Started"); /** - * Failed. + * Static value Failed for VMGuestPatchRebootStatus. */ public static final VMGuestPatchRebootStatus FAILED = fromString("Failed"); /** - * Completed. + * Static value Completed for VMGuestPatchRebootStatus. */ public static final VMGuestPatchRebootStatus COMPLETED = fromString("Completed"); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VolumeLicenseDetails.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VolumeLicenseDetails.java index f64c8b8c28ce..ab537e3a5c31 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VolumeLicenseDetails.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VolumeLicenseDetails.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -72,6 +72,14 @@ public VolumeLicenseDetails withInvoiceId(String invoiceId) { return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/WindowsParameters.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/WindowsParameters.java index f5e4b4665ce8..50898e06b329 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/WindowsParameters.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/WindowsParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.models; @@ -220,6 +220,14 @@ public WindowsParameters withPatchNameMasksToExclude(List patchNameMasks return this; } + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + /** * {@inheritDoc} */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/package-info.java index 5e27fe16d670..5b17a54d2a4b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for HybridCompute. - * Azure Arc( Servers and K8s Clusters) API reference for Private Link's Scopes management. + * Package containing the data models for HybridComputeManagementClient. + * The Hybrid Compute Management Client. */ package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/package-info.java index 7a2659b61497..1e451aba2d13 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the classes for HybridCompute. - * Azure Arc( Servers and K8s Clusters) API reference for Private Link's Scopes management. + * Package containing the classes for HybridComputeManagementClient. + * The Hybrid Compute Management Client. */ package com.azure.resourcemanager.hybridcompute; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/module-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/module-info.java index 7918ee511a62..77452241df86 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/module-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/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) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. module com.azure.resourcemanager.hybridcompute { requires transitive com.azure.core.management; @@ -12,5 +12,4 @@ opens com.azure.resourcemanager.hybridcompute.fluent.models to com.azure.core; opens com.azure.resourcemanager.hybridcompute.models to com.azure.core; - opens com.azure.resourcemanager.hybridcompute.implementation.models to com.azure.core; } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/azure-resourcemanager-hybridcompute_metadata.json b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/azure-resourcemanager-hybridcompute_metadata.json deleted file mode 100644 index 9f41ef73f533..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/azure-resourcemanager-hybridcompute_metadata.json +++ /dev/null @@ -1 +0,0 @@ -{"flavor":"azure","apiVersions":{"Microsoft.HybridCompute":"2025-09-16-preview"},"crossLanguagePackageId":"Microsoft.HybridCompute","crossLanguageVersion":"c3f7cfc7efb3","crossLanguageDefinitions":{"com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadataV2sClient":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadataV2sClient.get":"Microsoft.HybridCompute.ExtensionValueV2s.get","com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadataV2sClient.getWithResponse":"Microsoft.HybridCompute.ExtensionValueV2s.get","com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadataV2sClient.list":"Microsoft.HybridCompute.ExtensionValueV2s.list","com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadatasClient":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadatasClient.get":"Microsoft.HybridCompute.ExtensionValues.get","com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadatasClient.getWithResponse":"Microsoft.HybridCompute.ExtensionValues.get","com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadatasClient.list":"Microsoft.HybridCompute.ExtensionValues.list","com.azure.resourcemanager.hybridcompute.fluent.ExtensionPublishersClient":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.fluent.ExtensionPublishersClient.list":"Microsoft.HybridCompute.ExtensionPublisherOperationGroup.list","com.azure.resourcemanager.hybridcompute.fluent.ExtensionTypesClient":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.fluent.ExtensionTypesClient.list":"Microsoft.HybridCompute.ExtensionTypeOperationGroup.list","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient":"Microsoft.HybridCompute.Gateways","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.beginCreateOrUpdate":"Microsoft.HybridCompute.Gateways.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.beginDelete":"Microsoft.HybridCompute.Gateways.delete","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.createOrUpdate":"Microsoft.HybridCompute.Gateways.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.delete":"Microsoft.HybridCompute.Gateways.delete","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.getByResourceGroup":"Microsoft.HybridCompute.Gateways.get","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.getByResourceGroupWithResponse":"Microsoft.HybridCompute.Gateways.get","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.list":"Microsoft.HybridCompute.Gateways.listBySubscription","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.listByResourceGroup":"Microsoft.HybridCompute.Gateways.listByResourceGroup","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.update":"Microsoft.HybridCompute.Gateways.update","com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient.updateWithResponse":"Microsoft.HybridCompute.Gateways.update","com.azure.resourcemanager.hybridcompute.fluent.HybridComputeManagementClient":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient":"Microsoft.HybridCompute.LicenseProfiles","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient.beginCreateOrUpdate":"Microsoft.HybridCompute.LicenseProfiles.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient.beginDelete":"Microsoft.HybridCompute.LicenseProfiles.delete","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient.beginUpdate":"Microsoft.HybridCompute.LicenseProfiles.update","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient.createOrUpdate":"Microsoft.HybridCompute.LicenseProfiles.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient.delete":"Microsoft.HybridCompute.LicenseProfiles.delete","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient.get":"Microsoft.HybridCompute.LicenseProfiles.get","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient.getWithResponse":"Microsoft.HybridCompute.LicenseProfiles.get","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient.list":"Microsoft.HybridCompute.LicenseProfiles.list","com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient.update":"Microsoft.HybridCompute.LicenseProfiles.update","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient":"Microsoft.HybridCompute.Licenses","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.beginCreateOrUpdate":"Microsoft.HybridCompute.Licenses.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.beginDelete":"Microsoft.HybridCompute.Licenses.delete","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.beginUpdate":"Microsoft.HybridCompute.Licenses.update","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.beginValidateLicense":"Microsoft.HybridCompute.LicensesOperationGroup.validateLicense","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.createOrUpdate":"Microsoft.HybridCompute.Licenses.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.delete":"Microsoft.HybridCompute.Licenses.delete","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.getByResourceGroup":"Microsoft.HybridCompute.Licenses.get","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.getByResourceGroupWithResponse":"Microsoft.HybridCompute.Licenses.get","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.list":"Microsoft.HybridCompute.Licenses.listBySubscription","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.listByResourceGroup":"Microsoft.HybridCompute.Licenses.listByResourceGroup","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.update":"Microsoft.HybridCompute.Licenses.update","com.azure.resourcemanager.hybridcompute.fluent.LicensesClient.validateLicense":"Microsoft.HybridCompute.LicensesOperationGroup.validateLicense","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient":"Microsoft.HybridCompute.MachineExtensions","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient.beginCreateOrUpdate":"Microsoft.HybridCompute.MachineExtensions.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient.beginDelete":"Microsoft.HybridCompute.MachineExtensions.delete","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient.beginUpdate":"Microsoft.HybridCompute.MachineExtensions.update","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient.createOrUpdate":"Microsoft.HybridCompute.MachineExtensions.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient.delete":"Microsoft.HybridCompute.MachineExtensions.delete","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient.get":"Microsoft.HybridCompute.MachineExtensions.get","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient.getWithResponse":"Microsoft.HybridCompute.MachineExtensions.get","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient.list":"Microsoft.HybridCompute.MachineExtensions.list","com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient.update":"Microsoft.HybridCompute.MachineExtensions.update","com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient":"Microsoft.HybridCompute.MachineRunCommands","com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient.beginCreateOrUpdate":"Microsoft.HybridCompute.MachineRunCommands.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient.beginDelete":"Microsoft.HybridCompute.MachineRunCommands.delete","com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient.createOrUpdate":"Microsoft.HybridCompute.MachineRunCommands.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient.delete":"Microsoft.HybridCompute.MachineRunCommands.delete","com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient.get":"Microsoft.HybridCompute.MachineRunCommands.get","com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient.getWithResponse":"Microsoft.HybridCompute.MachineRunCommands.get","com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient.list":"Microsoft.HybridCompute.MachineRunCommands.list","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient":"Microsoft.HybridCompute.Machines","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.assessPatches":"Microsoft.HybridCompute.Machines.assessPatches","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.beginAssessPatches":"Microsoft.HybridCompute.Machines.assessPatches","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.beginDelete":"Microsoft.HybridCompute.Machines.delete","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.beginInstallPatches":"Microsoft.HybridCompute.Machines.installPatches","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.createOrUpdate":"Microsoft.HybridCompute.Machines.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.createOrUpdateWithResponse":"Microsoft.HybridCompute.Machines.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.delete":"Microsoft.HybridCompute.Machines.delete","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.getByResourceGroup":"Microsoft.HybridCompute.Machines.get","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.getByResourceGroupWithResponse":"Microsoft.HybridCompute.Machines.get","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.installPatches":"Microsoft.HybridCompute.Machines.installPatches","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.list":"Microsoft.HybridCompute.Machines.listBySubscription","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.listByResourceGroup":"Microsoft.HybridCompute.Machines.listByResourceGroup","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.update":"Microsoft.HybridCompute.Machines.update","com.azure.resourcemanager.hybridcompute.fluent.MachinesClient.updateWithResponse":"Microsoft.HybridCompute.Machines.update","com.azure.resourcemanager.hybridcompute.fluent.NetworkProfilesClient":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.fluent.NetworkProfilesClient.get":"Microsoft.HybridCompute.Machines.networkProfileGet","com.azure.resourcemanager.hybridcompute.fluent.NetworkProfilesClient.getWithResponse":"Microsoft.HybridCompute.Machines.networkProfileGet","com.azure.resourcemanager.hybridcompute.fluent.NetworkSecurityPerimeterConfigurationsClient":"Microsoft.HybridCompute.NetworkSecurityPerimeterConfigurations","com.azure.resourcemanager.hybridcompute.fluent.NetworkSecurityPerimeterConfigurationsClient.beginReconcileForPrivateLinkScope":"Microsoft.HybridCompute.NetworkSecurityPerimeterConfigurations.reconcileForPrivateLinkScope","com.azure.resourcemanager.hybridcompute.fluent.NetworkSecurityPerimeterConfigurationsClient.getByPrivateLinkScope":"Microsoft.HybridCompute.NetworkSecurityPerimeterConfigurations.getByPrivateLinkScope","com.azure.resourcemanager.hybridcompute.fluent.NetworkSecurityPerimeterConfigurationsClient.getByPrivateLinkScopeWithResponse":"Microsoft.HybridCompute.NetworkSecurityPerimeterConfigurations.getByPrivateLinkScope","com.azure.resourcemanager.hybridcompute.fluent.NetworkSecurityPerimeterConfigurationsClient.listByPrivateLinkScope":"Microsoft.HybridCompute.NetworkSecurityPerimeterConfigurations.listByPrivateLinkScope","com.azure.resourcemanager.hybridcompute.fluent.NetworkSecurityPerimeterConfigurationsClient.reconcileForPrivateLinkScope":"Microsoft.HybridCompute.NetworkSecurityPerimeterConfigurations.reconcileForPrivateLinkScope","com.azure.resourcemanager.hybridcompute.fluent.OperationsClient":"Microsoft.HybridCompute.Operations","com.azure.resourcemanager.hybridcompute.fluent.OperationsClient.list":"Microsoft.HybridCompute.Operations.list","com.azure.resourcemanager.hybridcompute.fluent.PrivateEndpointConnectionsClient":"Microsoft.HybridCompute.PrivateEndpointConnections","com.azure.resourcemanager.hybridcompute.fluent.PrivateEndpointConnectionsClient.beginCreateOrUpdate":"Microsoft.HybridCompute.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.HybridCompute.PrivateEndpointConnections.delete","com.azure.resourcemanager.hybridcompute.fluent.PrivateEndpointConnectionsClient.createOrUpdate":"Microsoft.HybridCompute.PrivateEndpointConnections.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.HybridCompute.PrivateEndpointConnections.delete","com.azure.resourcemanager.hybridcompute.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.HybridCompute.PrivateEndpointConnections.get","com.azure.resourcemanager.hybridcompute.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.HybridCompute.PrivateEndpointConnections.get","com.azure.resourcemanager.hybridcompute.fluent.PrivateEndpointConnectionsClient.listByPrivateLinkScope":"Microsoft.HybridCompute.PrivateEndpointConnections.listByPrivateLinkScope","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkResourcesClient":"Microsoft.HybridCompute.PrivateLinkResources","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkResourcesClient.get":"Microsoft.HybridCompute.PrivateLinkResources.get","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkResourcesClient.getWithResponse":"Microsoft.HybridCompute.PrivateLinkResources.get","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkResourcesClient.listByPrivateLinkScope":"Microsoft.HybridCompute.PrivateLinkResources.listByPrivateLinkScope","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.beginDelete":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.delete","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.createOrUpdate":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.createOrUpdateWithResponse":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.createOrUpdate","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.delete":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.delete","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.getByResourceGroup":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.get","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.getByResourceGroupWithResponse":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.get","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.getValidationDetails":"Microsoft.HybridCompute.PrivateLinkScopesOperationGroup.getValidationDetails","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.getValidationDetailsForMachine":"Microsoft.HybridCompute.Machines.getValidationDetailsForMachine","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.getValidationDetailsForMachineWithResponse":"Microsoft.HybridCompute.Machines.getValidationDetailsForMachine","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.getValidationDetailsWithResponse":"Microsoft.HybridCompute.PrivateLinkScopesOperationGroup.getValidationDetails","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.list":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.list","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.listByResourceGroup":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.listByResourceGroup","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.updateTags":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.updateTags","com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient.updateTagsWithResponse":"Microsoft.HybridCompute.HybridComputePrivateLinkScopes.updateTags","com.azure.resourcemanager.hybridcompute.fluent.ResourceProvidersClient":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.fluent.ResourceProvidersClient.beginSetupExtensions":"Microsoft.HybridCompute.Machines.setupExtensions","com.azure.resourcemanager.hybridcompute.fluent.ResourceProvidersClient.beginUpgradeExtensions":"Microsoft.HybridCompute.Machines.upgradeExtensions","com.azure.resourcemanager.hybridcompute.fluent.ResourceProvidersClient.setupExtensions":"Microsoft.HybridCompute.Machines.setupExtensions","com.azure.resourcemanager.hybridcompute.fluent.ResourceProvidersClient.upgradeExtensions":"Microsoft.HybridCompute.Machines.upgradeExtensions","com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient.get":"Microsoft.HybridCompute.SettingsOperationGroup.get","com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient.getWithResponse":"Microsoft.HybridCompute.SettingsOperationGroup.get","com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient.patch":"Microsoft.HybridCompute.SettingsOperationGroup.patch","com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient.patchWithResponse":"Microsoft.HybridCompute.SettingsOperationGroup.patch","com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient.update":"Microsoft.HybridCompute.SettingsOperationGroup.update","com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient.updateWithResponse":"Microsoft.HybridCompute.SettingsOperationGroup.update","com.azure.resourcemanager.hybridcompute.fluent.models.AccessRuleProperties":"Microsoft.HybridCompute.AccessRuleProperties","com.azure.resourcemanager.hybridcompute.fluent.models.EsuProfileUpdateProperties":"Microsoft.HybridCompute.EsuProfileUpdateProperties","com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionPublisherInner":"Microsoft.HybridCompute.ExtensionPublisher","com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionTypeInner":"Microsoft.HybridCompute.ExtensionType","com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueInner":"Microsoft.HybridCompute.ExtensionValue","com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueProperties":"Microsoft.HybridCompute.ExtensionValueProperties","com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueV2Inner":"Microsoft.HybridCompute.ExtensionValueV2","com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueV2Properties":"Microsoft.HybridCompute.ExtensionValueV2Properties","com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner":"Microsoft.HybridCompute.Gateway","com.azure.resourcemanager.hybridcompute.fluent.models.GatewayProperties":"Microsoft.HybridCompute.GatewayProperties","com.azure.resourcemanager.hybridcompute.fluent.models.GatewayUpdateProperties":"Microsoft.HybridCompute.GatewayUpdateProperties","com.azure.resourcemanager.hybridcompute.fluent.models.HybridComputePrivateLinkScopeInner":"Microsoft.HybridCompute.HybridComputePrivateLinkScope","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner":"Microsoft.HybridCompute.License","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileArmEsuProperties":"Microsoft.HybridCompute.LicenseProfileArmEsuProperties","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileArmProductProfileProperties":"Microsoft.HybridCompute.LicenseProfileArmProductProfileProperties","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileInner":"Microsoft.HybridCompute.LicenseProfile","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewEsuPropertiesInner":"Microsoft.HybridCompute.LicenseProfileMachineInstanceViewEsuProperties","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewInner":"Microsoft.HybridCompute.LicenseProfileMachineInstanceView","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewSoftwareAssurance":"Microsoft.HybridCompute.LicenseProfileMachineInstanceViewSoftwareAssurance","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileProperties":"Microsoft.HybridCompute.LicenseProfileProperties","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfilePropertiesSoftwareAssurance":"Microsoft.HybridCompute.LicenseProfilePropertiesSoftwareAssurance","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileUpdateProperties":"Microsoft.HybridCompute.LicenseProfileUpdateProperties","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileUpdatePropertiesSoftwareAssurance":"Microsoft.HybridCompute.LicenseProfileUpdatePropertiesSoftwareAssurance","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProperties":"Microsoft.HybridCompute.LicenseProperties","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseUpdateProperties":"Microsoft.HybridCompute.LicenseUpdateProperties","com.azure.resourcemanager.hybridcompute.fluent.models.LicenseUpdatePropertiesLicenseDetails":"Microsoft.HybridCompute.LicenseUpdatePropertiesLicenseDetails","com.azure.resourcemanager.hybridcompute.fluent.models.MachineAssessPatchesResultInner":"Microsoft.HybridCompute.MachineAssessPatchesResult","com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner":"Microsoft.HybridCompute.MachineExtension","com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionUpdateProperties":"Microsoft.HybridCompute.MachineExtensionUpdateProperties","com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner":"Microsoft.HybridCompute.Machine","com.azure.resourcemanager.hybridcompute.fluent.models.MachineInstallPatchesResultInner":"Microsoft.HybridCompute.MachineInstallPatchesResult","com.azure.resourcemanager.hybridcompute.fluent.models.MachinePropertiesInner":"Microsoft.HybridCompute.MachineProperties","com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner":"Microsoft.HybridCompute.MachineRunCommand","com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandProperties":"Microsoft.HybridCompute.MachineRunCommandProperties","com.azure.resourcemanager.hybridcompute.fluent.models.MachineUpdateProperties":"Microsoft.HybridCompute.MachineUpdateProperties","com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner":"Microsoft.HybridCompute.NetworkProfile","com.azure.resourcemanager.hybridcompute.fluent.models.NetworkSecurityPerimeterConfigurationInner":"Microsoft.HybridCompute.NetworkSecurityPerimeterConfiguration","com.azure.resourcemanager.hybridcompute.fluent.models.NetworkSecurityPerimeterConfigurationProperties":"Microsoft.HybridCompute.NetworkSecurityPerimeterConfigurationProperties","com.azure.resourcemanager.hybridcompute.fluent.models.NetworkSecurityPerimeterConfigurationReconcileResultInner":"Microsoft.HybridCompute.NetworkSecurityPerimeterConfigurationReconcileResult","com.azure.resourcemanager.hybridcompute.fluent.models.OperationValueInner":"Microsoft.HybridCompute.OperationValue","com.azure.resourcemanager.hybridcompute.fluent.models.PatchSettings":"Microsoft.HybridCompute.PatchSettings","com.azure.resourcemanager.hybridcompute.fluent.models.PrivateEndpointConnectionInner":"Microsoft.HybridCompute.PrivateEndpointConnection","com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkResourceInner":"Microsoft.HybridCompute.PrivateLinkResource","com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkScopeValidationDetailsInner":"Microsoft.HybridCompute.PrivateLinkScopeValidationDetails","com.azure.resourcemanager.hybridcompute.fluent.models.ProductProfileUpdateProperties":"Microsoft.HybridCompute.ProductProfileUpdateProperties","com.azure.resourcemanager.hybridcompute.fluent.models.ProvisioningIssueProperties":"Microsoft.HybridCompute.ProvisioningIssueProperties","com.azure.resourcemanager.hybridcompute.fluent.models.SettingsGatewayProperties":"Microsoft.HybridCompute.SettingsGatewayProperties","com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner":"Microsoft.HybridCompute.Settings","com.azure.resourcemanager.hybridcompute.fluent.models.SettingsProperties":"Microsoft.HybridCompute.SettingsProperties","com.azure.resourcemanager.hybridcompute.fluent.models.SetupExtensionRequestInner":"Microsoft.HybridCompute.SetupExtensionRequest","com.azure.resourcemanager.hybridcompute.implementation.HybridComputeManagementClientBuilder":"Microsoft.HybridCompute","com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionPublisherListResult":"Microsoft.HybridCompute.ExtensionPublisherListResult","com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionTypeListResult":"Microsoft.HybridCompute.ExtensionTypeListResult","com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionValueListResult":"Microsoft.HybridCompute.ExtensionValueListResult","com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionValueListResultV2":"Microsoft.HybridCompute.ExtensionValueListResultV2","com.azure.resourcemanager.hybridcompute.implementation.models.GatewaysListResult":"Microsoft.HybridCompute.GatewaysListResult","com.azure.resourcemanager.hybridcompute.implementation.models.HybridComputePrivateLinkScopeListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridcompute.implementation.models.LicenseProfilesListResult":"Microsoft.HybridCompute.LicenseProfilesListResult","com.azure.resourcemanager.hybridcompute.implementation.models.LicensesListResult":"Microsoft.HybridCompute.LicensesListResult","com.azure.resourcemanager.hybridcompute.implementation.models.MachineExtensionsListResult":"Microsoft.HybridCompute.MachineExtensionsListResult","com.azure.resourcemanager.hybridcompute.implementation.models.MachineListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridcompute.implementation.models.MachineRunCommandsListResult":"Microsoft.HybridCompute.MachineRunCommandsListResult","com.azure.resourcemanager.hybridcompute.implementation.models.NetworkSecurityPerimeterConfigurationListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridcompute.implementation.models.OperationListResult":"Microsoft.HybridCompute.OperationListResult","com.azure.resourcemanager.hybridcompute.implementation.models.PrivateEndpointConnectionListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridcompute.implementation.models.PrivateLinkResourceListResult":"Azure.ResourceManager.ResourceListResult","com.azure.resourcemanager.hybridcompute.models.AccessMode":"Microsoft.HybridCompute.AccessMode","com.azure.resourcemanager.hybridcompute.models.AccessRule":"Microsoft.HybridCompute.AccessRule","com.azure.resourcemanager.hybridcompute.models.AccessRuleDirection":"Microsoft.HybridCompute.AccessRuleDirection","com.azure.resourcemanager.hybridcompute.models.AgentConfiguration":"Microsoft.HybridCompute.AgentConfiguration","com.azure.resourcemanager.hybridcompute.models.AgentConfigurationMode":"Microsoft.HybridCompute.AgentConfigurationMode","com.azure.resourcemanager.hybridcompute.models.AgentUpgrade":"Microsoft.HybridCompute.AgentUpgrade","com.azure.resourcemanager.hybridcompute.models.ArcKindEnum":"Microsoft.HybridCompute.ArcKindEnum","com.azure.resourcemanager.hybridcompute.models.AssessmentModeTypes":"Microsoft.HybridCompute.AssessmentModeTypes","com.azure.resourcemanager.hybridcompute.models.AvailablePatchCountByClassification":"Microsoft.HybridCompute.AvailablePatchCountByClassification","com.azure.resourcemanager.hybridcompute.models.CloudMetadata":"Microsoft.HybridCompute.CloudMetadata","com.azure.resourcemanager.hybridcompute.models.ConfigurationExtension":"Microsoft.HybridCompute.ConfigurationExtension","com.azure.resourcemanager.hybridcompute.models.ConnectionDetail":"Microsoft.HybridCompute.ConnectionDetail","com.azure.resourcemanager.hybridcompute.models.Disk":"Microsoft.HybridCompute.Disk","com.azure.resourcemanager.hybridcompute.models.EsuEligibility":"Microsoft.HybridCompute.EsuEligibility","com.azure.resourcemanager.hybridcompute.models.EsuKey":"Microsoft.HybridCompute.EsuKey","com.azure.resourcemanager.hybridcompute.models.EsuKeyState":"Microsoft.HybridCompute.EsuKeyState","com.azure.resourcemanager.hybridcompute.models.EsuServerType":"Microsoft.HybridCompute.EsuServerType","com.azure.resourcemanager.hybridcompute.models.ExecutionState":"Microsoft.HybridCompute.ExecutionState","com.azure.resourcemanager.hybridcompute.models.ExtensionTargetProperties":"Microsoft.HybridCompute.ExtensionTargetProperties","com.azure.resourcemanager.hybridcompute.models.ExtensionsResourceStatus":"Microsoft.HybridCompute.ExtensionsResourceStatus","com.azure.resourcemanager.hybridcompute.models.ExtensionsStatusLevelTypes":"Microsoft.HybridCompute.ExtensionsStatusLevelTypes","com.azure.resourcemanager.hybridcompute.models.FirmwareProfile":"Microsoft.HybridCompute.FirmwareProfile","com.azure.resourcemanager.hybridcompute.models.GatewayType":"Microsoft.HybridCompute.GatewayType","com.azure.resourcemanager.hybridcompute.models.GatewayUpdate":"Microsoft.HybridCompute.GatewayUpdate","com.azure.resourcemanager.hybridcompute.models.HardwareProfile":"Microsoft.HybridCompute.HardwareProfile","com.azure.resourcemanager.hybridcompute.models.HotpatchEnablementStatus":"Microsoft.HybridCompute.HotpatchEnablementStatus","com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScopeProperties":"Microsoft.HybridCompute.HybridComputePrivateLinkScopeProperties","com.azure.resourcemanager.hybridcompute.models.Identity":"Azure.ResourceManager.CommonTypes.Identity","com.azure.resourcemanager.hybridcompute.models.IdentityKeyStore":"Microsoft.HybridCompute.IdentityKeyStore","com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes":"Microsoft.HybridCompute.InstanceViewTypes","com.azure.resourcemanager.hybridcompute.models.IpAddress":"Microsoft.HybridCompute.IpAddress","com.azure.resourcemanager.hybridcompute.models.LastAttemptStatusEnum":"Microsoft.HybridCompute.LastAttemptStatusEnum","com.azure.resourcemanager.hybridcompute.models.LicenseAssignmentState":"Microsoft.HybridCompute.LicenseAssignmentState","com.azure.resourcemanager.hybridcompute.models.LicenseCoreType":"Microsoft.HybridCompute.LicenseCoreType","com.azure.resourcemanager.hybridcompute.models.LicenseDetails":"Microsoft.HybridCompute.LicenseDetails","com.azure.resourcemanager.hybridcompute.models.LicenseEdition":"Microsoft.HybridCompute.LicenseEdition","com.azure.resourcemanager.hybridcompute.models.LicenseProfileArmEsuPropertiesWithoutAssignedLicense":"Microsoft.HybridCompute.LicenseProfileArmEsuPropertiesWithoutAssignedLicense","com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType":"Microsoft.HybridCompute.LicenseProfileProductType","com.azure.resourcemanager.hybridcompute.models.LicenseProfileStorageModelEsuProperties":"Microsoft.HybridCompute.LicenseProfileStorageModelEsuProperties","com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatus":"Microsoft.HybridCompute.LicenseProfileSubscriptionStatus","com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate":"Microsoft.HybridCompute.LicenseProfileSubscriptionStatusUpdate","com.azure.resourcemanager.hybridcompute.models.LicenseProfileUpdate":"Microsoft.HybridCompute.LicenseProfileUpdate","com.azure.resourcemanager.hybridcompute.models.LicenseState":"Microsoft.HybridCompute.LicenseState","com.azure.resourcemanager.hybridcompute.models.LicenseStatus":"Microsoft.HybridCompute.LicenseStatus","com.azure.resourcemanager.hybridcompute.models.LicenseTarget":"Microsoft.HybridCompute.LicenseTarget","com.azure.resourcemanager.hybridcompute.models.LicenseType":"Microsoft.HybridCompute.LicenseType","com.azure.resourcemanager.hybridcompute.models.LicenseUpdate":"Microsoft.HybridCompute.LicenseUpdate","com.azure.resourcemanager.hybridcompute.models.LinuxParameters":"Microsoft.HybridCompute.LinuxParameters","com.azure.resourcemanager.hybridcompute.models.LocationData":"Azure.ResourceManager.CommonTypes.LocationData","com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceView":"Microsoft.HybridCompute.MachineExtensionInstanceView","com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceViewStatus":"Microsoft.HybridCompute.MachineExtensionInstanceViewStatus","com.azure.resourcemanager.hybridcompute.models.MachineExtensionProperties":"Microsoft.HybridCompute.MachineExtensionProperties","com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpdate":"Microsoft.HybridCompute.MachineExtensionUpdate","com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpgrade":"Microsoft.HybridCompute.MachineExtensionUpgrade","com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters":"Microsoft.HybridCompute.MachineInstallPatchesParameters","com.azure.resourcemanager.hybridcompute.models.MachineRunCommandInstanceView":"Microsoft.HybridCompute.MachineRunCommandInstanceView","com.azure.resourcemanager.hybridcompute.models.MachineRunCommandScriptSource":"Microsoft.HybridCompute.MachineRunCommandScriptSource","com.azure.resourcemanager.hybridcompute.models.MachineUpdate":"Microsoft.HybridCompute.MachineUpdate","com.azure.resourcemanager.hybridcompute.models.NetworkInterface":"Microsoft.HybridCompute.NetworkInterface","com.azure.resourcemanager.hybridcompute.models.NetworkSecurityPerimeter":"Microsoft.HybridCompute.NetworkSecurityPerimeter","com.azure.resourcemanager.hybridcompute.models.NetworkSecurityPerimeterProfile":"Microsoft.HybridCompute.NetworkSecurityPerimeterProfile","com.azure.resourcemanager.hybridcompute.models.OSProfile":"Microsoft.HybridCompute.OSProfile","com.azure.resourcemanager.hybridcompute.models.OSProfileLinuxConfiguration":"Microsoft.HybridCompute.OSProfileLinuxConfiguration","com.azure.resourcemanager.hybridcompute.models.OSProfileWindowsConfiguration":"Microsoft.HybridCompute.OSProfileWindowsConfiguration","com.azure.resourcemanager.hybridcompute.models.OperationValueDisplay":"Microsoft.HybridCompute.OperationValueDisplay","com.azure.resourcemanager.hybridcompute.models.OsType":"Microsoft.HybridCompute.OsType","com.azure.resourcemanager.hybridcompute.models.PatchModeTypes":"Microsoft.HybridCompute.PatchModeTypes","com.azure.resourcemanager.hybridcompute.models.PatchOperationStartedBy":"Microsoft.HybridCompute.PatchOperationStartedBy","com.azure.resourcemanager.hybridcompute.models.PatchOperationStatus":"Microsoft.HybridCompute.PatchOperationStatus","com.azure.resourcemanager.hybridcompute.models.PatchServiceUsed":"Microsoft.HybridCompute.PatchServiceUsed","com.azure.resourcemanager.hybridcompute.models.PatchSettingsStatus":"Microsoft.HybridCompute.PatchSettingsStatus","com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionDataModel":"Microsoft.HybridCompute.PrivateEndpointConnectionDataModel","com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties":"Microsoft.HybridCompute.PrivateEndpointConnectionProperties","com.azure.resourcemanager.hybridcompute.models.PrivateEndpointProperty":"Microsoft.HybridCompute.PrivateEndpointProperty","com.azure.resourcemanager.hybridcompute.models.PrivateLinkResourceProperties":"Microsoft.HybridCompute.PrivateLinkResourceProperties","com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnectionStateProperty":"Microsoft.HybridCompute.PrivateLinkServiceConnectionStateProperty","com.azure.resourcemanager.hybridcompute.models.Processor":"Microsoft.HybridCompute.Processor","com.azure.resourcemanager.hybridcompute.models.ProductFeature":"Microsoft.HybridCompute.ProductFeature","com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate":"Microsoft.HybridCompute.ProductFeatureUpdate","com.azure.resourcemanager.hybridcompute.models.ProgramYear":"Microsoft.HybridCompute.ProgramYear","com.azure.resourcemanager.hybridcompute.models.ProvisioningIssue":"Microsoft.HybridCompute.ProvisioningIssue","com.azure.resourcemanager.hybridcompute.models.ProvisioningIssueSeverity":"Microsoft.HybridCompute.ProvisioningIssueSeverity","com.azure.resourcemanager.hybridcompute.models.ProvisioningIssueType":"Microsoft.HybridCompute.ProvisioningIssueType","com.azure.resourcemanager.hybridcompute.models.ProvisioningState":"Microsoft.HybridCompute.ProvisioningState","com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType":"Microsoft.HybridCompute.PublicNetworkAccessType","com.azure.resourcemanager.hybridcompute.models.ResourceAssociation":"Microsoft.HybridCompute.ResourceAssociation","com.azure.resourcemanager.hybridcompute.models.ResourceIdentityType":"Azure.ResourceManager.CommonTypes.ResourceIdentityType","com.azure.resourcemanager.hybridcompute.models.ResourceUpdate":"Microsoft.HybridCompute.ResourceUpdate","com.azure.resourcemanager.hybridcompute.models.RunCommandInputParameter":"Microsoft.HybridCompute.RunCommandInputParameter","com.azure.resourcemanager.hybridcompute.models.RunCommandManagedIdentity":"Microsoft.HybridCompute.RunCommandManagedIdentity","com.azure.resourcemanager.hybridcompute.models.ServiceExtension":"Microsoft.HybridCompute.ServiceExtension","com.azure.resourcemanager.hybridcompute.models.ServiceExtensionPublicNetworkAccess":"Microsoft.HybridCompute.ServiceExtensionPublicNetworkAccess","com.azure.resourcemanager.hybridcompute.models.ServiceStatus":"Microsoft.HybridCompute.ServiceStatus","com.azure.resourcemanager.hybridcompute.models.ServiceStatuses":"Microsoft.HybridCompute.ServiceStatuses","com.azure.resourcemanager.hybridcompute.models.StatusLevelTypes":"Microsoft.HybridCompute.StatusLevelTypes","com.azure.resourcemanager.hybridcompute.models.StatusTypes":"Microsoft.HybridCompute.StatusTypes","com.azure.resourcemanager.hybridcompute.models.StorageProfile":"Microsoft.HybridCompute.StorageProfile","com.azure.resourcemanager.hybridcompute.models.Subnet":"Microsoft.HybridCompute.Subnet","com.azure.resourcemanager.hybridcompute.models.TagsResource":"Microsoft.HybridCompute.TagsResource","com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationLinux":"Microsoft.HybridCompute.VMGuestPatchClassification_Linux","com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationWindows":"Microsoft.HybridCompute.VMGuestPatchClassification_Windows","com.azure.resourcemanager.hybridcompute.models.VMGuestPatchRebootSetting":"Microsoft.HybridCompute.VMGuestPatchRebootSetting","com.azure.resourcemanager.hybridcompute.models.VMGuestPatchRebootStatus":"Microsoft.HybridCompute.VMGuestPatchRebootStatus","com.azure.resourcemanager.hybridcompute.models.VolumeLicenseDetails":"Microsoft.HybridCompute.VolumeLicenseDetails","com.azure.resourcemanager.hybridcompute.models.WindowsParameters":"Microsoft.HybridCompute.WindowsParameters"},"generatedFiles":["src/main/java/com/azure/resourcemanager/hybridcompute/HybridComputeManager.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadataV2sClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadatasClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionPublishersClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionTypesClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/GatewaysClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/HybridComputeManagementClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicenseProfilesClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicensesClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineExtensionsClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachinesClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkProfilesClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkSecurityPerimeterConfigurationsClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkScopesClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ResourceProvidersClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/SettingsOperationsClient.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AccessRuleProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/EsuProfileUpdateProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionPublisherInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionTypeInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueV2Inner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueV2Properties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayUpdateProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridComputePrivateLinkScopeInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmEsuProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmProductProfileProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewEsuPropertiesInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewSoftwareAssurance.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfilePropertiesSoftwareAssurance.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdateProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdatePropertiesSoftwareAssurance.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdateProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdatePropertiesLicenseDetails.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineAssessPatchesResultInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionUpdateProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInstallPatchesResultInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachinePropertiesInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineUpdateProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkProfileInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkSecurityPerimeterConfigurationReconcileResultInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/OperationValueInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PatchSettings.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkScopeValidationDetailsInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProductProfileUpdateProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsGatewayProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SetupExtensionRequestInner.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/hybridcompute/fluent/package-info.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadataV2sImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublisherImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionPublishersImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypeImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionTypesImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueV2Impl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewayImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputePrivateLinkScopeImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewEsuPropertiesImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineAssessPatchesResultImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineInstallPatchesResultImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinePropertiesImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfileImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationReconcileResultImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkSecurityPerimeterConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationValueImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopeValidationDetailsImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsClientImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SetupExtensionRequestImpl.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionPublisherListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionTypeListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionValueListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/ExtensionValueListResultV2.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/GatewaysListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/HybridComputePrivateLinkScopeListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/LicenseProfilesListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/LicensesListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineExtensionsListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/MachineRunCommandsListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/implementation/package-info.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessMode.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRule.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRuleDirection.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfiguration.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfigurationMode.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentUpgrade.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ArcKindEnum.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/AssessmentModeTypes.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/AvailablePatchCountByClassification.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/CloudMetadata.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ConfigurationExtension.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ConnectionDetail.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Disk.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuEligibility.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKey.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKeyState.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuServerType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExecutionState.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadataV2s.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadatas.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublisher.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionPublishers.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTargetProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTypes.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValue.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueV2.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsResourceStatus.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsStatusLevelTypes.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/FirmwareProfile.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateway.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayUpdate.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateways.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/HardwareProfile.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/HotpatchEnablementStatus.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScope.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Identity.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/IdentityKeyStore.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/InstanceViewTypes.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/IpAddress.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LastAttemptStatusEnum.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/License.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseAssignmentState.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseCoreType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseDetails.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseEdition.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfile.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceView.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceViewEsuProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileProductType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileStorageModelEsuProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatus.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatusUpdate.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileUpdate.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfiles.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseState.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseStatus.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseTarget.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseUpdate.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Licenses.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LinuxParameters.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/LocationData.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Machine.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineAssessPatchesResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtension.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceView.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceViewStatus.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpdate.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpgrade.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensions.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesParameters.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommand.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandInstanceView.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandScriptSource.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineUpdate.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Machines.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkInterface.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfile.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfiles.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfiguration.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurationReconcileResult.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterConfigurations.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkSecurityPerimeterProfile.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfile.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileLinuxConfiguration.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileWindowsConfiguration.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValue.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValueDisplay.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Operations.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/OsType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchModeTypes.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStartedBy.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStatus.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchServiceUsed.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchSettingsStatus.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionDataModel.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointProperty.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopeValidationDetails.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopes.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkServiceConnectionStateProperty.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Processor.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeature.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeatureUpdate.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ProgramYear.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueSeverity.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/PublicNetworkAccessType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceAssociation.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceProviders.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceUpdate.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandInputParameter.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandManagedIdentity.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceExtension.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceExtensionPublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatus.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatuses.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Settings.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/SettingsOperations.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/SetupExtensionRequest.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusLevelTypes.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusTypes.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/StorageProfile.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/Subnet.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/TagsResource.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationLinux.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationWindows.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootSetting.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootStatus.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/VolumeLicenseDetails.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/WindowsParameters.java","src/main/java/com/azure/resourcemanager/hybridcompute/models/package-info.java","src/main/java/com/azure/resourcemanager/hybridcompute/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataGetSamples.java index 5dcf78fd619b..d69c2d9e913f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataGetSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class ExtensionMetadataGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionMetadata_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionMetadata_Get.json */ /** * Sample code: GET an extensions metadata. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataListSamples.java index 1b088549a6c2..66ae97c0989b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class ExtensionMetadataListSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionMetadata_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionMetadata_List.json */ /** * Sample code: GET a list of extensions. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2GetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2GetSamples.java index 296bf6c5f2b2..f0b1d7e565c3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2GetSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2GetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class ExtensionMetadataV2GetSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionMetadataV2_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionMetadataV2_Get.json */ /** * Sample code: GET an extension metadata. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2ListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2ListSamples.java index 0011e6583527..fa6a1b82c27a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2ListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2ListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class ExtensionMetadataV2ListSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionMetadataV2_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionMetadataV2_List.json */ /** * Sample code: GET a list of extension metadata. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherListSamples.java index 6d5d14e5c26b..6534d01c442e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class ExtensionPublisherListSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionPublisher_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionPublisher_List.json */ /** * Sample code: GET a list of extension publishers. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeListSamples.java index 7cb4fdebfa48..e5e2cf1fd8bb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class ExtensionTypeListSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/ExtensionType_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/ExtensionType_List.json */ /** * Sample code: GET a list of extension types. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateSamples.java index c1176fe84c2d..097a52398572 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -12,7 +12,9 @@ */ public final class GatewaysCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_CreateOrUpdate.json */ /** * Sample code: Create or Update a Gateway. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysDeleteSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysDeleteSamples.java index 7d0bbc12ab14..f28689abac61 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysDeleteSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class GatewaysDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_Delete.json */ /** * Sample code: Delete a Gateway. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupSamples.java index dec342bd2b83..ca2c3d315647 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class GatewaysGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_Get.json */ /** * Sample code: Get Gateway. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupSamples.java index f52b854fc11c..a3ff6de1e4b2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class GatewaysListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_ListByResourceGroup.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_ListByResourceGroup.json */ /** * Sample code: List Gateways by Resource Group. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListSamples.java index 9d30159f76c3..f0c5b6ea4a6e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class GatewaysListSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_ListBySubscription.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_ListBySubscription.json */ /** * Sample code: List Gateways by Subscription. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysUpdateSamples.java index 2cb9cd42c835..57de498397cc 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -12,7 +12,9 @@ */ public final class GatewaysUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/gateway/Gateway_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/gateway/ + * Gateway_Update.json */ /** * Sample code: Update a Gateway. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesCreateOrUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesCreateOrUpdateSamples.java index af20b55c80f9..89ca63d81a47 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesCreateOrUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -14,7 +14,9 @@ */ public final class LicenseProfilesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_CreateOrUpdate.json */ /** * Sample code: Create or Update a License Profile. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesDeleteSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesDeleteSamples.java index e9b7c7080934..ea39b29f3e80 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesDeleteSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class LicenseProfilesDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_Delete.json */ /** * Sample code: Delete a License Profile. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesGetSamples.java index 3658cd52f55a..6bf9c18e37bb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesGetSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class LicenseProfilesGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_Get.json */ /** * Sample code: Get License Profile. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesListSamples.java index 4393e0b5f4d7..1532013a6b1f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class LicenseProfilesListSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_List.json */ /** * Sample code: List all License Profiles. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesUpdateSamples.java index 3159f668118e..f89eb4c4f27b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -15,7 +15,9 @@ */ public final class LicenseProfilesUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/licenseProfile/LicenseProfile_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * licenseProfile/LicenseProfile_Update.json */ /** * Sample code: Update a License Profile. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateSamples.java index 300cc345dca1..9edb426ae135 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -16,7 +16,9 @@ */ public final class LicensesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_CreateOrUpdate.json */ /** * Sample code: Create or Update a License. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteSamples.java index c9d8dee94684..d2217e7eba7c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class LicensesDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_Delete.json */ /** * Sample code: Delete a License. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupSamples.java index 38a69f24fcc8..9aa7ba9bf4e1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class LicensesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_Get.json */ /** * Sample code: Get License. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupSamples.java index 45708add0e9a..84676e6dec00 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class LicensesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_ListByResourceGroup.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_ListByResourceGroup.json */ /** * Sample code: GET all Machine Extensions. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListSamples.java index 19a477590482..e593b6ddca4c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class LicensesListSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_ListBySubscription.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_ListBySubscription.json */ /** * Sample code: List Licenses by Subscription. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesUpdateSamples.java index 112fd297ac9d..3d10012210e3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -16,7 +16,9 @@ */ public final class LicensesUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_Update.json */ /** * Sample code: Update a License. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseSamples.java index 8a33ec2cab08..c5debc932f9a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -17,7 +17,9 @@ */ public final class LicensesValidateLicenseSamples { /* - * x-ms-original-file: 2025-09-16-preview/license/License_ValidateLicense.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/license/ + * License_ValidateLicense.json */ /** * Sample code: Validate a License. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsCreateOrUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsCreateOrUpdateSamples.java index 8cf6f7db90b5..accd36d3f4dd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsCreateOrUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -13,7 +13,9 @@ */ public final class MachineExtensionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_CreateOrUpdate.json */ /** * Sample code: Create or Update a Machine Extension. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsDeleteSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsDeleteSamples.java index 89a8a4500703..c3b0e955f759 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsDeleteSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachineExtensionsDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_Delete.json */ /** * Sample code: Delete a Machine Extension. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsGetSamples.java index 187a486662a6..3a148d0d745e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsGetSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachineExtensionsGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_Get.json */ /** * Sample code: GET Machine Extension. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsListSamples.java index de447d7b97c1..df825753bc95 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachineExtensionsListSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_List.json */ /** * Sample code: GET all Machine Extensions - List. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsUpdateSamples.java index c59b935c5122..3f3686e94663 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -13,7 +13,9 @@ */ public final class MachineExtensionsUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_Update.json */ /** * Sample code: Create or Update a Machine Extension. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsCreateOrUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsCreateOrUpdateSamples.java index 2d07b21d5997..2b4ed3a184c2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsCreateOrUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -13,7 +13,9 @@ */ public final class MachineRunCommandsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/runCommand/RunCommands_CreateOrUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * runCommand/RunCommands_CreateOrUpdate.json */ /** * Sample code: Create or Update a Run Command. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsDeleteSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsDeleteSamples.java index dcafd5e943be..df624f33a828 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsDeleteSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachineRunCommandsDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/runCommand/RunCommands_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * runCommand/RunCommands_Delete.json */ /** * Sample code: Delete a Machine Run Command. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsGetSamples.java index 7a2b6988dc84..b7b317402965 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsGetSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachineRunCommandsGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/runCommand/RunCommands_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * runCommand/RunCommands_Get.json */ /** * Sample code: Get a Run Command. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsListSamples.java index 3cdc812a9d87..3c7c1da89f56 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachineRunCommandsListSamples { /* - * x-ms-original-file: 2025-09-16-preview/runCommand/RunCommands_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * runCommand/RunCommands_List.json */ /** * Sample code: GET all Machine Run Commands. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesAssessPatchesSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesAssessPatchesSamples.java index 019b98b8002f..3c4f135b5525 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesAssessPatchesSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesAssessPatchesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachinesAssessPatchesSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machine_AssessPatches.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machine_AssessPatches.json */ /** * Sample code: Assess patch state of a machine. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesCreateOrUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesCreateOrUpdateSamples.java deleted file mode 100644 index a2d846238bc8..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesCreateOrUpdateSamples.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.resourcemanager.hybridcompute.models.Identity; -import com.azure.resourcemanager.hybridcompute.models.IdentityKeyStore; -import com.azure.resourcemanager.hybridcompute.models.LocationData; -import com.azure.resourcemanager.hybridcompute.models.OSProfile; -import com.azure.resourcemanager.hybridcompute.models.OSProfileWindowsConfiguration; -import com.azure.resourcemanager.hybridcompute.models.ResourceIdentityType; - -/** - * Samples for Machines CreateOrUpdate. - */ -public final class MachinesCreateOrUpdateSamples { - /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update a Machine. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void createOrUpdateAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.machines() - .define("myMachine") - .withRegion("eastus2euap") - .withExistingResourceGroup("myResourceGroup") - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withLocationData(new LocationData().withName("Redmond")) - .withOsProfile(new OSProfile() - .withWindowsConfiguration(new OSProfileWindowsConfiguration().withEnableHotpatching(true))) - .withVmId("b7a098cc-b0b8-46e8-a205-62f301a62a8f") - .withClientPublicKey("string") - .withIdentityKeyStore(IdentityKeyStore.TPM) - .withTpmEkCertificate("string") - .withPrivateLinkScopeResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName") - .withParentClusterResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.AzureStackHCI/clusters/myAzureStackHCICluster") - .create(); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesDeleteSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesDeleteSamples.java index d80ca0cbe3db..fe1776c84e0d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesDeleteSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachinesDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_Delete.json */ /** * Sample code: Delete a Machine. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesGetByResourceGroupSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesGetByResourceGroupSamples.java index 8f42ca9282b4..0898ac362607 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesGetByResourceGroupSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -11,7 +11,9 @@ */ public final class MachinesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_Get_LicenseProfileInstanceView.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_Get_LicenseProfileInstanceView.json */ /** * Sample code: Get Machine with License Profile Instance View. @@ -26,7 +28,9 @@ public final class MachinesGetByResourceGroupSamples { } /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_Get.json */ /** * Sample code: Get Machine. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesInstallPatchesSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesInstallPatchesSamples.java index 1ecfc856e305..f15146046a1e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesInstallPatchesSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesInstallPatchesSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -17,7 +17,9 @@ */ public final class MachinesInstallPatchesSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machine_InstallPatches.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machine_InstallPatches.json */ /** * Sample code: Install patch state of a machine. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesListByResourceGroupSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesListByResourceGroupSamples.java index cdc4839435b9..509a2fca50bc 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesListByResourceGroupSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachinesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_ListByResourceGroup.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_ListByResourceGroup.json */ /** * Sample code: List Machines by resource group. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesListSamples.java index 413d838d6e8e..84e137c1e69c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class MachinesListSamples { /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_ListBySubscription.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/machine/ + * Machines_ListBySubscription.json */ /** * Sample code: List Machines by resource group. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesUpdateSamples.java deleted file mode 100644 index f6933389d88b..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesUpdateSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.resourcemanager.hybridcompute.models.AssessmentModeTypes; -import com.azure.resourcemanager.hybridcompute.models.Identity; -import com.azure.resourcemanager.hybridcompute.models.LocationData; -import com.azure.resourcemanager.hybridcompute.models.Machine; -import com.azure.resourcemanager.hybridcompute.models.OSProfile; -import com.azure.resourcemanager.hybridcompute.models.OSProfileLinuxConfiguration; -import com.azure.resourcemanager.hybridcompute.models.OSProfileWindowsConfiguration; -import com.azure.resourcemanager.hybridcompute.models.PatchModeTypes; -import com.azure.resourcemanager.hybridcompute.models.ResourceIdentityType; - -/** - * Samples for Machines Update. - */ -public final class MachinesUpdateSamples { - /* - * x-ms-original-file: 2025-09-16-preview/machine/Machines_Update.json - */ - /** - * Sample code: Update a Machine. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void updateAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - Machine resource = manager.machines() - .getByResourceGroupWithResponse("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withLocationData(new LocationData().withName("Redmond")) - .withOsProfile(new OSProfile() - .withWindowsConfiguration( - new OSProfileWindowsConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) - .withPatchMode(PatchModeTypes.AUTOMATIC_BY_PLATFORM) - .withEnableHotpatching(true)) - .withLinuxConfiguration( - new OSProfileLinuxConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) - .withPatchMode(PatchModeTypes.MANUAL))) - .withParentClusterResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.AzureStackHCI/clusters/myAzureStackHCICluster") - .withPrivateLinkScopeResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName") - .withIdentityKeyStore("TPM") - .withTpmEkCertificate("string") - .apply(); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfileGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfileGetSamples.java index 0bbb3c8fa987..55cd4dd9a8ec 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfileGetSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfileGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class NetworkProfileGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/NetworkProfile_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * NetworkProfile_Get.json */ /** * Sample code: GET Network Profile. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSamples.java index 422bb64dde5f..85954377f89a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -10,7 +10,8 @@ public final class NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSamples { /* * x-ms-original-file: - * 2025-09-16-preview/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json */ /** * Sample code: Gets the network security perimeter configuration of the private link scope. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeSamples.java index 94e7ff89d2b1..d1497e4d10ba 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -10,7 +10,8 @@ public final class NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeSamples { /* * x-ms-original-file: - * 2025-09-16-preview/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json */ /** * Sample code: Gets the list of network security perimeter configurations of the private link scope. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSamples.java index 4b1c233fc315..75117c9a7097 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -10,7 +10,8 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSamples { /* * x-ms-original-file: - * 2025-09-16-preview/networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json */ /** * Sample code: Reconciles the network security perimeter configuration of the private link scope. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/OperationsListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/OperationsListSamples.java index a2f518d0d00f..7fb54a96e0c5 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/OperationsListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: 2025-09-16-preview/Operations_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * Operations_List.json */ /** * Sample code: List Hybrid Compute Provider Operations. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 553180d98e6b..5cd645327682 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -12,7 +12,9 @@ */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateEndpoint/PrivateEndpointConnection_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_Update.json */ /** * Sample code: Approve or reject a private endpoint connection with a given name. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsDeleteSamples.java index cb6f05b1f9af..7a4c47264cb4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateEndpoint/PrivateEndpointConnection_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_Delete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsGetSamples.java index 53e496e6a5db..c534692b7823 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateEndpoint/PrivateEndpointConnection_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_Get.json */ /** * Sample code: Gets private endpoint connection. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsListByPrivateLinkScopeSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsListByPrivateLinkScopeSamples.java index 96364f53869d..1c174d10bde6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsListByPrivateLinkScopeSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsListByPrivateLinkScopeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateEndpoint/PrivateEndpointConnection_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_List.json */ /** * Sample code: Gets list of private endpoint connections on a private link scope. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesGetSamples.java index 79c6bb526315..f184c448aa5d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json */ /** * Sample code: Gets private endpoint connection. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesListByPrivateLinkScopeSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesListByPrivateLinkScopeSamples.java index 0baac49e659d..9fb74c41086d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesListByPrivateLinkScopeSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesListByPrivateLinkScopeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateLinkResourcesListByPrivateLinkScopeSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json */ /** * Sample code: Gets private endpoint connection. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateSamples.java index fb4d41f99cd8..7c67675e9e97 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -12,7 +12,9 @@ */ public final class PrivateLinkScopesCreateOrUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_Create.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Create.json */ /** * Sample code: PrivateLinkScopeCreate. @@ -28,7 +30,9 @@ public static void privateLinkScopeCreate(com.azure.resourcemanager.hybridcomput } /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_Update.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Update.json */ /** * Sample code: PrivateLinkScopeUpdate. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteSamples.java index 2f0891ea6526..46ce73f7873a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateLinkScopesDeleteSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_Delete.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Delete.json */ /** * Sample code: PrivateLinkScopesDelete. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetByResourceGroupSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetByResourceGroupSamples.java index 81cef7c22f45..93dc8632d6ed 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetByResourceGroupSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateLinkScopesGetByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_Get.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Get.json */ /** * Sample code: PrivateLinkScopeGet. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsForMachineSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsForMachineSamples.java index e191f5063aaa..cdd54b5d255d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsForMachineSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsForMachineSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateLinkScopesGetValidationDetailsForMachineSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json */ /** * Sample code: PrivateLinkScopeGet. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsSamples.java index 4286db071967..cc2e831fe6f5 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateLinkScopesGetValidationDetailsSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_GetValidation.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_GetValidation.json */ /** * Sample code: PrivateLinkScopeGet. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListByResourceGroupSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListByResourceGroupSamples.java index f1b726cb3ca9..8e295a4c22c1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListByResourceGroupSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateLinkScopesListByResourceGroupSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json */ /** * Sample code: PrivateLinkScopeListByResourceGroup. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListSamples.java index 983b070b8f27..1c5f928c0d79 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class PrivateLinkScopesListSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_List.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_List.json */ /** * Sample code: PrivateLinkScopesList.json. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesUpdateTagsSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesUpdateTagsSamples.java index 0712cd534931..9608516a6004 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesUpdateTagsSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesUpdateTagsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -13,7 +13,9 @@ */ public final class PrivateLinkScopesUpdateTagsSamples { /* - * x-ms-original-file: 2025-09-16-preview/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json */ /** * Sample code: PrivateLinkScopeUpdateTagsOnly. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProviderSetupExtensionsSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProviderSetupExtensionsSamples.java index 1c7562a91bc1..f65ce572325b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProviderSetupExtensionsSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProviderSetupExtensionsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -13,7 +13,9 @@ */ public final class ResourceProviderSetupExtensionsSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extension_Add.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extension_Add.json */ /** * Sample code: Setup Machine Extensions. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProviderUpgradeExtensionsSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProviderUpgradeExtensionsSamples.java index 32204795cc5e..428a4df38eaa 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProviderUpgradeExtensionsSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProviderUpgradeExtensionsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -14,7 +14,9 @@ */ public final class ResourceProviderUpgradeExtensionsSamples { /* - * x-ms-original-file: 2025-09-16-preview/extension/Extensions_Upgrade.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/ + * extension/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationGetSamples.java index b0002a71d4f4..13c4a2c21623 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationGetSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,7 +9,9 @@ */ public final class SettingsOperationGetSamples { /* - * x-ms-original-file: 2025-09-16-preview/settings/SettingsGet.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/settings + * /SettingsGet.json */ /** * Sample code: NetworkConfigurationsGet. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationPatchSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationPatchSamples.java index 89b2f5c8b079..d360bda6000e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationPatchSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationPatchSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -11,7 +11,9 @@ */ public final class SettingsOperationPatchSamples { /* - * x-ms-original-file: 2025-09-16-preview/settings/SettingsPatch.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/settings + * /SettingsPatch.json */ /** * Sample code: NetworkConfigurationsPatch. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationUpdateSamples.java index fdec70d8a708..8fb20f9dc26b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationUpdateSamples.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -11,7 +11,9 @@ */ public final class SettingsOperationUpdateSamples { /* - * x-ms-original-file: 2025-09-16-preview/settings/SettingsUpdate.json + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2025-02-19-preview/examples/settings + * /SettingsUpdate.json */ /** * Sample code: SettingsUpdate. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRulePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRulePropertiesTests.java deleted file mode 100644 index 208fff8fdd9a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRulePropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.AccessRuleProperties; - -public final class AccessRulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessRuleProperties model - = BinaryData.fromString("{\"direction\":\"Inbound\",\"addressPrefixes\":[\"vutpthjoxo\"]}") - .toObject(AccessRuleProperties.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRuleTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRuleTests.java deleted file mode 100644 index 8b7afa9b1268..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRuleTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.AccessRule; - -public final class AccessRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessRule model = BinaryData.fromString( - "{\"name\":\"ynszquji\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"tiby\",\"wb\"]}}") - .toObject(AccessRule.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentConfigurationTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentConfigurationTests.java deleted file mode 100644 index 7f525f056e66..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentConfigurationTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.AgentConfiguration; - -public final class AgentConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AgentConfiguration model = BinaryData.fromString( - "{\"proxyUrl\":\"fkbey\",\"incomingConnectionsPorts\":[\"rmjmwvvjektc\",\"senhwlrs\",\"frzpwvlqdqgb\",\"qylihkaetckt\"],\"extensionsAllowList\":[{\"publisher\":\"vf\",\"type\":\"kymuctqhjfbebr\"},{\"publisher\":\"xerf\",\"type\":\"utttxfvjrbirp\"},{\"publisher\":\"epcyvahfnlj\",\"type\":\"qxj\"},{\"publisher\":\"ujqgidok\",\"type\":\"ljyoxgvcltb\"}],\"extensionsBlockList\":[{\"publisher\":\"ghkjeszzhbi\",\"type\":\"txfvgx\"},{\"publisher\":\"smx\",\"type\":\"hmpvecx\"}],\"proxyBypass\":[\"ebfqkkrbm\",\"ukgri\",\"flz\",\"fbxzpuzycisp\"],\"extensionsEnabled\":\"zahmgkbrpyydhibn\",\"guestConfigurationEnabled\":\"qkpikadrgvtqagnb\",\"configMode\":\"monitor\"}") - .toObject(AgentConfiguration.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentUpgradeTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentUpgradeTests.java deleted file mode 100644 index 4d99ed736af3..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentUpgradeTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.AgentUpgrade; -import org.junit.jupiter.api.Assertions; - -public final class AgentUpgradeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AgentUpgrade model = BinaryData.fromString( - "{\"desiredVersion\":\"cn\",\"correlationId\":\"hbttkphyw\",\"enableAutomaticUpgrade\":true,\"lastAttemptDesiredVersion\":\"t\",\"lastAttemptTimestamp\":\"2021-05-21T17:30:58Z\",\"lastAttemptStatus\":\"Failed\",\"lastAttemptMessage\":\"clfp\"}") - .toObject(AgentUpgrade.class); - Assertions.assertEquals("cn", model.desiredVersion()); - Assertions.assertEquals("hbttkphyw", model.correlationId()); - Assertions.assertTrue(model.enableAutomaticUpgrade()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentUpgrade model = new AgentUpgrade().withDesiredVersion("cn") - .withCorrelationId("hbttkphyw") - .withEnableAutomaticUpgrade(true); - model = BinaryData.fromObject(model).toObject(AgentUpgrade.class); - Assertions.assertEquals("cn", model.desiredVersion()); - Assertions.assertEquals("hbttkphyw", model.correlationId()); - Assertions.assertTrue(model.enableAutomaticUpgrade()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AvailablePatchCountByClassificationTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AvailablePatchCountByClassificationTests.java deleted file mode 100644 index af3c86f76681..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AvailablePatchCountByClassificationTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.AvailablePatchCountByClassification; - -public final class AvailablePatchCountByClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailablePatchCountByClassification model = BinaryData.fromString( - "{\"security\":1254452597,\"critical\":1550438212,\"definition\":860787642,\"updateRollup\":1929847054,\"featurePack\":1598005613,\"servicePack\":1083170526,\"tools\":1371154692,\"updates\":326974416,\"other\":1838860649}") - .toObject(AvailablePatchCountByClassification.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/CloudMetadataTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/CloudMetadataTests.java deleted file mode 100644 index 10189ec57f1c..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/CloudMetadataTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.CloudMetadata; - -public final class CloudMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CloudMetadata model = BinaryData.fromString("{\"provider\":\"fcnj\"}").toObject(CloudMetadata.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CloudMetadata model = new CloudMetadata(); - model = BinaryData.fromObject(model).toObject(CloudMetadata.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ConfigurationExtensionTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ConfigurationExtensionTests.java deleted file mode 100644 index 0f56a4786a34..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ConfigurationExtensionTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ConfigurationExtension; - -public final class ConfigurationExtensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationExtension model - = BinaryData.fromString("{\"publisher\":\"ijggmebfsiar\",\"type\":\"trcvpnazzmh\"}") - .toObject(ConfigurationExtension.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ConnectionDetailTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ConnectionDetailTests.java deleted file mode 100644 index 2820e9712883..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ConnectionDetailTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ConnectionDetail; - -public final class ConnectionDetailTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectionDetail model = BinaryData.fromString( - "{\"id\":\"vu\",\"privateIpAddress\":\"ztcktyh\",\"linkIdentifier\":\"qedcgzulwm\",\"groupId\":\"qzz\",\"memberName\":\"jvpglydzgk\"}") - .toObject(ConnectionDetail.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/DiskTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/DiskTests.java deleted file mode 100644 index ca56c78da56e..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/DiskTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.Disk; -import org.junit.jupiter.api.Assertions; - -public final class DiskTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Disk model = BinaryData.fromString( - "{\"path\":\"pskrdqmh\",\"diskType\":\"dhtldwkyz\",\"generatedId\":\"utknc\",\"id\":\"cwsvlxotog\",\"name\":\"rupqsxvnmicy\",\"maxSizeInBytes\":2479857435116958141,\"usedSpaceInBytes\":3102849164515336583}") - .toObject(Disk.class); - Assertions.assertEquals("pskrdqmh", model.path()); - Assertions.assertEquals("dhtldwkyz", model.diskType()); - Assertions.assertEquals("utknc", model.generatedId()); - Assertions.assertEquals("cwsvlxotog", model.id()); - Assertions.assertEquals("rupqsxvnmicy", model.name()); - Assertions.assertEquals(2479857435116958141L, model.maxSizeInBytes()); - Assertions.assertEquals(3102849164515336583L, model.usedSpaceInBytes()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/EsuKeyTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/EsuKeyTests.java deleted file mode 100644 index 2f8f13aadc8a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/EsuKeyTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.EsuKey; -import org.junit.jupiter.api.Assertions; - -public final class EsuKeyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EsuKey model = BinaryData.fromString("{\"sku\":\"pbewtghfgblcgwx\",\"licenseStatus\":1623747079}") - .toObject(EsuKey.class); - Assertions.assertEquals("pbewtghfgblcgwx", model.sku()); - Assertions.assertEquals(1623747079, model.licenseStatus()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/EsuProfileUpdatePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/EsuProfileUpdatePropertiesTests.java deleted file mode 100644 index d1b8933e78c7..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/EsuProfileUpdatePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.EsuProfileUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class EsuProfileUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EsuProfileUpdateProperties model = BinaryData.fromString("{\"assignedLicense\":\"ddxbjhwuaanoz\"}") - .toObject(EsuProfileUpdateProperties.class); - Assertions.assertEquals("ddxbjhwuaanoz", model.assignedLicense()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EsuProfileUpdateProperties model = new EsuProfileUpdateProperties().withAssignedLicense("ddxbjhwuaanoz"); - model = BinaryData.fromObject(model).toObject(EsuProfileUpdateProperties.class); - Assertions.assertEquals("ddxbjhwuaanoz", model.assignedLicense()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2sGetWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2sGetWithResponseMockTests.java index ca6ab2160f5a..cadb64a8f070 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2sGetWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2sGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -20,7 +20,7 @@ public final class ExtensionMetadataV2sGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"extensionUris\":[\"ceagbjqvlsumywz\",\"shxgonoy\"],\"extensionSignatureUri\":\"qipubyz\",\"operatingSystem\":\"lkfk\",\"architecture\":[\"gv\",\"pemtuoqu\"],\"version\":\"yegq\",\"extensionType\":\"nigflqqbtnyj\",\"publisher\":\"lxdbfvabmvms\"},\"id\":\"aevwjcnkot\",\"name\":\"lwuhvajmailfe\",\"type\":\"jjzakzwjiqullqx\"}"; + = "{\"properties\":{\"extensionUris\":[\"ykxdssjpemmuc\"],\"extensionSignatureUri\":\"hikkflrmy\",\"operatingSystem\":\"incqlhriswsl\",\"architecture\":[\"iov\",\"qcgxuug\",\"kctotiowlxteq\"],\"version\":\"tjgwdtguk\",\"extensionType\":\"nblwphqlkcc\",\"publisher\":\"gygqwah\"},\"id\":\"ulwgniiprglvawuw\",\"name\":\"d\",\"type\":\"fypiv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExtensionValueV2 response = manager.extensionMetadataV2s() - .getWithResponse("mj", "ajcxnyqgxhl", "srv", "i", com.azure.core.util.Context.NONE) + .getWithResponse("pmru", "znabaobns", "ujdjltymkmvg", "ihywartspph", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2sListMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2sListMockTests.java index 97c776da2911..2aab7291d463 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2sListMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadataV2sListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -21,7 +21,7 @@ public final class ExtensionMetadataV2sListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"extensionUris\":[\"dj\"],\"extensionSignatureUri\":\"n\",\"operatingSystem\":\"muii\",\"architecture\":[\"pfoh\",\"kfkxbbcbrwjiut\",\"njizb\"],\"version\":\"woiymrvz\",\"extensionType\":\"uyrsrziuctix\",\"publisher\":\"d\"},\"id\":\"ifrevk\",\"name\":\"apezkiswqjmdghs\",\"type\":\"parybjufpt\"}]}"; + = "{\"value\":[{\"properties\":{\"extensionUris\":[\"ovpbbttefjoknssq\",\"zqedikdfrdbi\",\"mrjgeihfqlggwfi\"],\"extensionSignatureUri\":\"cxmjpbyephmg\",\"operatingSystem\":\"ljvrcmyfqipgxhnp\",\"architecture\":[\"qwcabvnui\",\"eeyaswl\",\"augmrmfjlr\"],\"version\":\"toaukhfkvcisiz\",\"extensionType\":\"a\",\"publisher\":\"sx\"},\"id\":\"uivedwcgyeewxeiq\",\"name\":\"psmgo\",\"type\":\"guamlj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ 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.extensionMetadataV2s().list("dmvr", "cm", "erndbrnyeofltfnn", com.azure.core.util.Context.NONE); + PagedIterable response = manager.extensionMetadataV2s() + .list("sbbjpmcu", "kmifoxxkub", "phavpmhbrb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadatasGetWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadatasGetWithResponseMockTests.java index 6aab2221e6d9..ba04b4c2a0cd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadatasGetWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadatasGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -20,7 +20,7 @@ public final class ExtensionMetadatasGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"version\":\"ci\",\"extensionType\":\"ceatlijjjrtvamca\",\"publisher\":\"knxkvccxetyvkunm\"},\"id\":\"nohikkgq\",\"name\":\"g\",\"type\":\"wpin\"}"; + = "{\"properties\":{\"version\":\"qswankltytmhdr\",\"extensionType\":\"nnhdrl\",\"publisher\":\"gjc\"},\"id\":\"guxhem\",\"name\":\"wyw\",\"type\":\"eeczgfbu\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ExtensionValue response = manager.extensionMetadatas() - .getWithResponse("vlmfej", "oqeykglt", "gxhqfgqkayejs", "tlgflwfgz", com.azure.core.util.Context.NONE) + .getWithResponse("rnfxtgddp", "th", "hn", "naoyank", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadatasListMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadatasListMockTests.java index 0a0c4112f6f8..92605591b5af 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadatasListMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionMetadatasListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -21,7 +21,7 @@ public final class ExtensionMetadatasListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"version\":\"u\",\"extensionType\":\"slczwciidjsllf\",\"publisher\":\"vdmvxadqa\"},\"id\":\"rgnawbabgfbk\",\"name\":\"yjmfczlfsyqkfr\",\"type\":\"zgowox\"}]}"; + = "{\"value\":[{\"properties\":{\"version\":\"esqplp\",\"extensionType\":\"jcdoewb\",\"publisher\":\"yvteowxvgpiudeu\"},\"id\":\"sxze\",\"name\":\"paxwkufyk\",\"type\":\"vuhx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ 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.extensionMetadatas() - .list("edvabbxbhmedeilb", "ywfcfxzi", "zzihvwy", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.extensionMetadatas().list("klelssxb", "ycsxzu", "ksrl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherInnerTests.java deleted file mode 100644 index 16f9623976f8..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherInnerTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionPublisherInner; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionPublisherInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionPublisherInner model = BinaryData.fromString("{\"id\":\"exrxzbujrtrhq\",\"name\":\"revkhgnlnzo\"}") - .toObject(ExtensionPublisherInner.class); - Assertions.assertEquals("exrxzbujrtrhq", model.id()); - Assertions.assertEquals("revkhgnlnzo", model.name()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherListResultTests.java deleted file mode 100644 index cd3fbb27da6c..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublisherListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionPublisherListResult; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionPublisherListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionPublisherListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"uqyrxpdl\",\"name\":\"qlsismjqfrddg\"},{\"id\":\"quhiosrsjuivf\",\"name\":\"is\"}],\"nextLink\":\"rnxzh\"}") - .toObject(ExtensionPublisherListResult.class); - Assertions.assertEquals("rnxzh", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublishersListMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublishersListMockTests.java index 66e4b7eb4052..0eba01270acd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublishersListMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionPublishersListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -21,7 +21,7 @@ public final class ExtensionPublishersListMockTests { @Test public void testList() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"fulubef\",\"name\":\"bpmfbfununmpzkrv\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"hkgmnsg\",\"name\":\"xycphdrwjjkh\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.extensionPublishers().list("zptdmkrrbh", com.azure.core.util.Context.NONE); + = manager.extensionPublishers().list("ypnyghshxc", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fulubef", response.iterator().next().id()); - Assertions.assertEquals("bpmfbfununmpzkrv", response.iterator().next().name()); + Assertions.assertEquals("hkgmnsg", response.iterator().next().id()); + Assertions.assertEquals("xycphdrwjjkh", response.iterator().next().name()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTargetPropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTargetPropertiesTests.java deleted file mode 100644 index ea4dd0c68bbb..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTargetPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ExtensionTargetProperties; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionTargetPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionTargetProperties model - = BinaryData.fromString("{\"targetVersion\":\"zehtbmu\"}").toObject(ExtensionTargetProperties.class); - Assertions.assertEquals("zehtbmu", model.targetVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtensionTargetProperties model = new ExtensionTargetProperties().withTargetVersion("zehtbmu"); - model = BinaryData.fromObject(model).toObject(ExtensionTargetProperties.class); - Assertions.assertEquals("zehtbmu", model.targetVersion()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeInnerTests.java deleted file mode 100644 index 1fa1bb8f74be..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeInnerTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionTypeInner; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionTypeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionTypeInner model = BinaryData.fromString("{\"id\":\"rtffyaqitmh\",\"name\":\"ioqaqhvs\"}") - .toObject(ExtensionTypeInner.class); - Assertions.assertEquals("rtffyaqitmh", model.id()); - Assertions.assertEquals("ioqaqhvs", model.name()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeListResultTests.java deleted file mode 100644 index 243d5cdbbd8a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypeListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionTypeListResult; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionTypeListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionTypeListResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"tad\",\"name\":\"aeukm\"},{\"id\":\"ieekpndzaa\",\"name\":\"udqmeqwigpibudq\"}],\"nextLink\":\"xebeybpmz\"}") - .toObject(ExtensionTypeListResult.class); - Assertions.assertEquals("xebeybpmz", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypesListMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypesListMockTests.java index 147b165fbba9..8415103aea1c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypesListMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionTypesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -21,7 +21,7 @@ public final class ExtensionTypesListMockTests { @Test public void testList() throws Exception { - String responseStr = "{\"value\":[{\"id\":\"hsbrcary\",\"name\":\"jjzyvoaqajuve\"}]}"; + String responseStr = "{\"value\":[{\"id\":\"wgnxkympqanxrj\",\"name\":\"xtwbta\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.extensionTypes().list("swbnfddepldwqjns", "zygleexahvm", com.azure.core.util.Context.NONE); + = manager.extensionTypes().list("l", "gmsplzgaufcshhv", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hsbrcary", response.iterator().next().id()); - Assertions.assertEquals("jjzyvoaqajuve", response.iterator().next().name()); + Assertions.assertEquals("wgnxkympqanxrj", response.iterator().next().id()); + Assertions.assertEquals("xtwbta", response.iterator().next().name()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueInnerTests.java deleted file mode 100644 index b921e7700e13..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueInner; - -public final class ExtensionValueInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionValueInner model = BinaryData.fromString( - "{\"properties\":{\"version\":\"qgsjjxun\",\"extensionType\":\"gketwzhhzjhf\",\"publisher\":\"hvvmuvgpmun\"},\"id\":\"sx\",\"name\":\"mhfbuzjy\",\"type\":\"hsasbhu\"}") - .toObject(ExtensionValueInner.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueListResultTests.java deleted file mode 100644 index 6b3a5b6d7dd4..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueListResultTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionValueListResult; - -public final class ExtensionValueListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionValueListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"version\":\"xhnfhqly\",\"extensionType\":\"jouw\",\"publisher\":\"kxoyzunbixxr\"},\"id\":\"kvcpwpgclr\",\"name\":\"ivtsoxfrkenxpm\",\"type\":\"yefrpmpdnqqska\"},{\"properties\":{\"version\":\"qvmmbn\",\"extensionType\":\"fr\",\"publisher\":\"lkzmegnitgvkxl\"},\"id\":\"qdrfegcealzxwhc\",\"name\":\"nsymoyqhlwigd\",\"type\":\"vbkbxgomf\"}],\"nextLink\":\"uwasqvd\"}") - .toObject(ExtensionValueListResult.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueListResultV2Tests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueListResultV2Tests.java deleted file mode 100644 index ea2ff31fc048..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueListResultV2Tests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.ExtensionValueListResultV2; -import org.junit.jupiter.api.Assertions; - -public final class ExtensionValueListResultV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionValueListResultV2 model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"extensionUris\":[\"jwsawddjibab\",\"vit\",\"tvtzeexavoxtfg\",\"ecdmdqbwpy\"],\"extensionSignatureUri\":\"tgsfja\",\"operatingSystem\":\"slhhxudbxv\",\"architecture\":[\"tnsi\",\"ud\"],\"version\":\"m\",\"extensionType\":\"sckdlp\",\"publisher\":\"zrcxfailcfxwmdbo\"},\"id\":\"fgsftufqob\",\"name\":\"jln\",\"type\":\"cgcckknhxkizvyt\"},{\"properties\":{\"extensionUris\":[\"uljraae\",\"anokqgu\",\"kjq\",\"vbroylaxxu\"],\"extensionSignatureUri\":\"disdosfjbjsvgj\",\"operatingSystem\":\"hryvy\",\"architecture\":[\"dclxgc\"],\"version\":\"nfnw\",\"extensionType\":\"tmvpdvjdhtt\",\"publisher\":\"efedxihchrphkm\"},\"id\":\"jdqnsdfzpbgt\",\"name\":\"kylkdghrj\",\"type\":\"uutlwxezwzhok\"},{\"properties\":{\"extensionUris\":[\"hh\",\"qlgehg\"],\"extensionSignatureUri\":\"ipifhpfeoajvg\",\"operatingSystem\":\"txjcsheafidlt\",\"architecture\":[\"resmkssjhoiftxfk\"],\"version\":\"egprhptil\",\"extensionType\":\"cbiqtgdqoh\",\"publisher\":\"wsldrizetpwbr\"},\"id\":\"llibphbqzmizak\",\"name\":\"kan\",\"type\":\"jpdn\"}],\"nextLink\":\"ha\"}") - .toObject(ExtensionValueListResultV2.class); - Assertions.assertEquals("ha", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValuePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValuePropertiesTests.java deleted file mode 100644 index 70b0a73752fd..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValuePropertiesTests.java +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueProperties; - -public final class ExtensionValuePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionValueProperties model = BinaryData - .fromString( - "{\"version\":\"pohyuemslynsqyr\",\"extensionType\":\"oobrlttyms\",\"publisher\":\"ygqdnfwqzdz\"}") - .toObject(ExtensionValueProperties.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueV2InnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueV2InnerTests.java deleted file mode 100644 index f0c342195c72..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueV2InnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueV2Inner; - -public final class ExtensionValueV2InnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionValueV2Inner model = BinaryData.fromString( - "{\"properties\":{\"extensionUris\":[\"guxak\"],\"extensionSignatureUri\":\"qzhzbezkgimsi\",\"operatingSystem\":\"asi\",\"architecture\":[\"yvvjskgfmo\",\"wa\",\"pqg\",\"tjeaahhvjhh\"],\"version\":\"kzyb\",\"extensionType\":\"jid\",\"publisher\":\"syxkyxvxevblb\"},\"id\":\"dnlj\",\"name\":\"age\",\"type\":\"aulx\"}") - .toObject(ExtensionValueV2Inner.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueV2PropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueV2PropertiesTests.java deleted file mode 100644 index 1d906c072e8d..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ExtensionValueV2PropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueV2Properties; - -public final class ExtensionValueV2PropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtensionValueV2Properties model = BinaryData.fromString( - "{\"extensionUris\":[\"mjbnk\",\"pxynenlsvxeizzg\",\"klnsrmffey\"],\"extensionSignatureUri\":\"ckt\",\"operatingSystem\":\"ymerteeammxq\",\"architecture\":[\"kkzddrtkgdojbmx\"],\"version\":\"vrefdeesv\",\"extensionType\":\"uij\",\"publisher\":\"txsu\"}") - .toObject(ExtensionValueV2Properties.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/FirmwareProfileTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/FirmwareProfileTests.java deleted file mode 100644 index ec5be35110aa..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/FirmwareProfileTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.FirmwareProfile; - -public final class FirmwareProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirmwareProfile model - = BinaryData.fromString("{\"serialNumber\":\"lo\",\"type\":\"oty\"}").toObject(FirmwareProfile.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayInnerTests.java deleted file mode 100644 index 255c5d2a32e0..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner; -import com.azure.resourcemanager.hybridcompute.models.GatewayType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class GatewayInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GatewayInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"gatewayId\":\"qiby\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"owx\",\"allowedFeatures\":[\"djrkvfgbvfvpd\",\"odacizs\",\"q\",\"hkr\"]},\"location\":\"bdeibqipqk\",\"tags\":{\"refajpjorwkqnyh\":\"xndzwm\",\"j\":\"b\"},\"id\":\"jivfxzsjabib\",\"name\":\"ystawfsdjpvkvp\",\"type\":\"jxbkzbzkdvn\"}") - .toObject(GatewayInner.class); - Assertions.assertEquals("bdeibqipqk", model.location()); - Assertions.assertEquals("xndzwm", model.tags().get("refajpjorwkqnyh")); - Assertions.assertEquals(GatewayType.PUBLIC, model.gatewayType()); - Assertions.assertEquals("djrkvfgbvfvpd", model.allowedFeatures().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GatewayInner model = new GatewayInner().withLocation("bdeibqipqk") - .withTags(mapOf("refajpjorwkqnyh", "xndzwm", "j", "b")) - .withGatewayType(GatewayType.PUBLIC) - .withAllowedFeatures(Arrays.asList("djrkvfgbvfvpd", "odacizs", "q", "hkr")); - model = BinaryData.fromObject(model).toObject(GatewayInner.class); - Assertions.assertEquals("bdeibqipqk", model.location()); - Assertions.assertEquals("xndzwm", model.tags().get("refajpjorwkqnyh")); - Assertions.assertEquals(GatewayType.PUBLIC, model.gatewayType()); - Assertions.assertEquals("djrkvfgbvfvpd", model.allowedFeatures().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; - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayPropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayPropertiesTests.java deleted file mode 100644 index 799d5730073d..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayProperties; -import com.azure.resourcemanager.hybridcompute.models.GatewayType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GatewayPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GatewayProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"gatewayId\":\"udurgkakmokz\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"lffhmouwqlg\",\"allowedFeatures\":[\"zeeyebi\",\"ikayuhqlbjbsybb\",\"wrv\"]}") - .toObject(GatewayProperties.class); - Assertions.assertEquals(GatewayType.PUBLIC, model.gatewayType()); - Assertions.assertEquals("zeeyebi", model.allowedFeatures().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GatewayProperties model = new GatewayProperties().withGatewayType(GatewayType.PUBLIC) - .withAllowedFeatures(Arrays.asList("zeeyebi", "ikayuhqlbjbsybb", "wrv")); - model = BinaryData.fromObject(model).toObject(GatewayProperties.class); - Assertions.assertEquals(GatewayType.PUBLIC, model.gatewayType()); - Assertions.assertEquals("zeeyebi", model.allowedFeatures().get(0)); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdatePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdatePropertiesTests.java deleted file mode 100644 index c5fcb0cf5974..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdatePropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayUpdateProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GatewayUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GatewayUpdateProperties model = BinaryData.fromString("{\"allowedFeatures\":[\"drhneuyow\",\"kdw\"]}") - .toObject(GatewayUpdateProperties.class); - Assertions.assertEquals("drhneuyow", model.allowedFeatures().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GatewayUpdateProperties model - = new GatewayUpdateProperties().withAllowedFeatures(Arrays.asList("drhneuyow", "kdw")); - model = BinaryData.fromObject(model).toObject(GatewayUpdateProperties.class); - Assertions.assertEquals("drhneuyow", model.allowedFeatures().get(0)); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdateTests.java deleted file mode 100644 index 11b7295d12b7..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdateTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.GatewayUpdate; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class GatewayUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GatewayUpdate model = BinaryData - .fromString( - "{\"properties\":{\"allowedFeatures\":[\"mfpgv\",\"pip\"]},\"tags\":{\"wbdsr\":\"thaqfxssmwu\"}}") - .toObject(GatewayUpdate.class); - Assertions.assertEquals("thaqfxssmwu", model.tags().get("wbdsr")); - Assertions.assertEquals("mfpgv", model.allowedFeatures().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GatewayUpdate model = new GatewayUpdate().withTags(mapOf("wbdsr", "thaqfxssmwu")) - .withAllowedFeatures(Arrays.asList("mfpgv", "pip")); - model = BinaryData.fromObject(model).toObject(GatewayUpdate.class); - Assertions.assertEquals("thaqfxssmwu", model.tags().get("wbdsr")); - Assertions.assertEquals("mfpgv", model.allowedFeatures().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; - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateMockTests.java index d175f9ab1ff4..a860ef1394e0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -25,7 +25,7 @@ public final class GatewaysCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"gatewayId\":\"kbr\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"l\",\"allowedFeatures\":[\"kutvlxhrpqhv\"]},\"location\":\"lcouqehbhbcdszir\",\"tags\":{\"pmbltoormkfql\":\"ndo\"},\"id\":\"xldykalsygaolnjp\",\"name\":\"nbmjksibjgsjjxxa\",\"type\":\"mr\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"gatewayId\":\"jzcfyjzptwr\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"pqinf\",\"allowedFeatures\":[\"yglqdhmrjzral\",\"xpjb\",\"ypsjoq\",\"jenkyh\"]},\"location\":\"zv\",\"tags\":{\"mpzqjhhhq\":\"fxjelg\",\"bsizus\":\"uwyvcacoyvi\",\"lzijiufehgmvflnw\":\"szlbscm\",\"kxrerlniylylyfwx\":\"v\"},\"id\":\"utgqztwh\",\"name\":\"hmupgxyjtcdxabbu\",\"type\":\"ftabenbbklqp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,19 +35,18 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Gateway response = manager.gateways() - .define("ryjqgdkf") - .withRegion("hxsgxj") - .withExistingResourceGroup("ufr") - .withTags(mapOf("wsdrnpxqwodif", "zrrscub", "jogjonmc", "jxcjrmmuabwib", "oyzbamwineofvf", "e", "lz", - "akpoldtvevbo")) + .define("nggiycwkdtaa") + .withRegion("wijymr") + .withExistingResourceGroup("aujvaa") + .withTags(mapOf("ozkyewnfnzh", "u", "jkutycyarnr", "hqosmf", "ghktdpy", "ohguabz")) .withGatewayType(GatewayType.PUBLIC) - .withAllowedFeatures(Arrays.asList("mqkyojwyvfkmbts")) + .withAllowedFeatures(Arrays.asList("tbnxwbjsid", "irkfpksokdgo")) .create(); - Assertions.assertEquals("lcouqehbhbcdszir", response.location()); - Assertions.assertEquals("ndo", response.tags().get("pmbltoormkfql")); + Assertions.assertEquals("zv", response.location()); + Assertions.assertEquals("fxjelg", response.tags().get("mpzqjhhhq")); Assertions.assertEquals(GatewayType.PUBLIC, response.gatewayType()); - Assertions.assertEquals("kutvlxhrpqhv", response.allowedFeatures().get(0)); + Assertions.assertEquals("yglqdhmrjzral", response.allowedFeatures().get(0)); } // Use "Map.of" if available diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupWithResponseMockTests.java index 5196dc9625b0..b3382bcccdae 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -22,7 +22,7 @@ public final class GatewaysGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"gatewayId\":\"uc\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"pcjttbstvjeaqn\",\"allowedFeatures\":[\"vfkoxml\"]},\"location\":\"ktuidvrm\",\"tags\":{\"bhpwvqsgnyy\":\"pdwwexymzvlazi\",\"patlbijp\":\"uzivensrpmeyyvp\",\"olmk\":\"gsksrfhf\",\"ommpvfqaw\":\"bnxwc\"},\"id\":\"fgbrtt\",\"name\":\"iac\",\"type\":\"kiexhajlfnthiq\"}"; + = "{\"properties\":{\"provisioningState\":\"Creating\",\"gatewayId\":\"sjvh\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"tk\",\"allowedFeatures\":[\"jp\",\"vssehaepw\",\"mcxtczhu\",\"euknijduyyes\"]},\"location\":\"djfbocyv\",\"tags\":{\"gbhgau\":\"lrtywikdmhlakuf\",\"f\":\"cdixmx\",\"oeoq\":\"sryjqgdkfno\"},\"id\":\"vjhvefgwbm\",\"name\":\"jchnta\",\"type\":\"faymxbulpz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Gateway response = manager.gateways() - .getByResourceGroupWithResponse("yintqpbrlcy", "duczkgof", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("illcecfehu", "aoaguhicqlli", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ktuidvrm", response.location()); - Assertions.assertEquals("pdwwexymzvlazi", response.tags().get("bhpwvqsgnyy")); + Assertions.assertEquals("djfbocyv", response.location()); + Assertions.assertEquals("lrtywikdmhlakuf", response.tags().get("gbhgau")); Assertions.assertEquals(GatewayType.PUBLIC, response.gatewayType()); - Assertions.assertEquals("vfkoxml", response.allowedFeatures().get(0)); + Assertions.assertEquals("jp", response.allowedFeatures().get(0)); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupMockTests.java index 0f06ef884c9e..79156b2674ee 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -23,7 +23,7 @@ public final class GatewaysListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"gatewayId\":\"twwgzwx\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"cvogygzyvne\",\"allowedFeatures\":[\"ifgh\",\"moqqtlffhzbk\",\"kjj\"]},\"location\":\"vfqnvhnqoewdo\",\"tags\":{\"b\":\"etesypvidbztjhqt\",\"etnjuhpsprkz\":\"vnynkb\"},\"id\":\"aupia\",\"name\":\"cxnafbwqrooh\",\"type\":\"uovmaonurjt\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"gatewayId\":\"ahxsgxjcmm\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"cubiwsdr\",\"allowedFeatures\":[\"qwodiffjx\"]},\"location\":\"rmmuabwibvjo\",\"tags\":{\"e\":\"nmc\",\"akpoldtvevbo\":\"oyzbamwineofvf\",\"zjknyuxg\":\"lz\"},\"id\":\"ttxpnrupza\",\"name\":\"mrdixtreki\",\"type\":\"swyskbruffg\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,11 +33,11 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.gateways().listByResourceGroup("yuttdiygbpvnwswm", com.azure.core.util.Context.NONE); + = manager.gateways().listByResourceGroup("albmqkyojwyvfk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("vfqnvhnqoewdo", response.iterator().next().location()); - Assertions.assertEquals("etesypvidbztjhqt", response.iterator().next().tags().get("b")); + Assertions.assertEquals("rmmuabwibvjo", response.iterator().next().location()); + Assertions.assertEquals("nmc", response.iterator().next().tags().get("e")); Assertions.assertEquals(GatewayType.PUBLIC, response.iterator().next().gatewayType()); - Assertions.assertEquals("ifgh", response.iterator().next().allowedFeatures().get(0)); + Assertions.assertEquals("qwodiffjx", response.iterator().next().allowedFeatures().get(0)); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListMockTests.java index 4c29207c766a..b0383a416533 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -23,7 +23,7 @@ public final class GatewaysListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"gatewayId\":\"hpv\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"lclblyjxltbsju\",\"allowedFeatures\":[\"sfxigctmgx\",\"upbezqccydrt\",\"eukdqkkyih\",\"tg\"]},\"location\":\"mgqzgwldoyc\",\"tags\":{\"waoaguhi\":\"lcecfeh\",\"jvhrweft\":\"qllizstac\",\"aepwamcxtcz\":\"wqejpmvsse\",\"pydjfboc\":\"upeuknijduyye\"},\"id\":\"v\",\"name\":\"hulrtywikdmhla\",\"type\":\"uflgbhgauacdixm\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"gatewayId\":\"utvlxhr\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"mblcouqehbhbcds\",\"allowedFeatures\":[\"yr\",\"ndo\"]},\"location\":\"mbltoo\",\"tags\":{\"aolnjpnnbmjk\":\"fqlwxldykalsy\",\"nadzyq\":\"ibjgsjjxxahm\"},\"id\":\"gxyivpinbmh\",\"name\":\"bjijkgqxnh\",\"type\":\"bkezn\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,9 +34,9 @@ public void testList() throws Exception { PagedIterable response = manager.gateways().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("mgqzgwldoyc", response.iterator().next().location()); - Assertions.assertEquals("lcecfeh", response.iterator().next().tags().get("waoaguhi")); + Assertions.assertEquals("mbltoo", response.iterator().next().location()); + Assertions.assertEquals("fqlwxldykalsy", response.iterator().next().tags().get("aolnjpnnbmjk")); Assertions.assertEquals(GatewayType.PUBLIC, response.iterator().next().gatewayType()); - Assertions.assertEquals("sfxigctmgx", response.iterator().next().allowedFeatures().get(0)); + Assertions.assertEquals("yr", response.iterator().next().allowedFeatures().get(0)); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListResultTests.java deleted file mode 100644 index 92091aa6b42a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListResultTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.GatewaysListResult; -import com.azure.resourcemanager.hybridcompute.models.GatewayType; -import org.junit.jupiter.api.Assertions; - -public final class GatewaysListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GatewaysListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"gatewayId\":\"ircgpikpz\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"zanl\",\"allowedFeatures\":[\"iavrm\"]},\"location\":\"onok\",\"tags\":{\"irgzp\":\"jq\"},\"id\":\"rlazszrnw\",\"name\":\"iin\",\"type\":\"fpwpjylwbt\"}],\"nextLink\":\"flsjc\"}") - .toObject(GatewaysListResult.class); - Assertions.assertEquals("onok", model.value().get(0).location()); - Assertions.assertEquals("jq", model.value().get(0).tags().get("irgzp")); - Assertions.assertEquals(GatewayType.PUBLIC, model.value().get(0).gatewayType()); - Assertions.assertEquals("iavrm", model.value().get(0).allowedFeatures().get(0)); - Assertions.assertEquals("flsjc", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HardwareProfileTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HardwareProfileTests.java deleted file mode 100644 index 0635fd118846..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HardwareProfileTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.HardwareProfile; - -public final class HardwareProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HardwareProfile model = BinaryData.fromString( - "{\"totalPhysicalMemoryInBytes\":8739681618516710945,\"numberOfCpuSockets\":2095135848,\"processors\":[{\"name\":\"zt\",\"numberOfCores\":1372436938},{\"name\":\"wrqpue\",\"numberOfCores\":2070417133},{\"name\":\"ywbiexzfeyueax\",\"numberOfCores\":1627970479},{\"name\":\"jwbhqwalmuz\",\"numberOfCores\":1532421493}]}") - .toObject(HardwareProfile.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HybridComputePrivateLinkScopeInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HybridComputePrivateLinkScopeInnerTests.java deleted file mode 100644 index c3f3d3eaaedf..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HybridComputePrivateLinkScopeInnerTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.HybridComputePrivateLinkScopeInner; -import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScopeProperties; -import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtension; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtensionPublicNetworkAccess; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class HybridComputePrivateLinkScopeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HybridComputePrivateLinkScopeInner model = BinaryData.fromString( - "{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"vtoepryutnw\",\"privateLinkScopeId\":\"pzdm\",\"privateEndpointConnections\":[{\"id\":\"fvaawzqa\",\"name\":\"lgzurig\",\"type\":\"ecxn\",\"properties\":{\"privateEndpoint\":{\"id\":\"okpvzm\"},\"privateLinkServiceConnectionState\":{\"status\":\"t\",\"description\":\"ld\",\"actionsRequired\":\"obfirclnpk\"},\"provisioningState\":\"ayzri\",\"groupIds\":[\"yawfvjlboxq\"]}},{\"id\":\"jlmxhomdynhd\",\"name\":\"igu\",\"type\":\"nraauzz\",\"properties\":{\"privateEndpoint\":{\"id\":\"zysdzh\"},\"privateLinkServiceConnectionState\":{\"status\":\"wwvaiqyuvvfonk\",\"description\":\"hhqyi\",\"actionsRequired\":\"y\"},\"provisioningState\":\"uyav\",\"groupIds\":[\"mncsttijfybvp\"]}}],\"serviceExtensions\":[{\"serviceExtensionType\":\"\\\"datasgsgbdhu\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"},{\"serviceExtensionType\":\"\\\"dataj\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"}]},\"location\":\"nscliqhzvhxnk\",\"tags\":{\"hihfrbbcevqagtlt\":\"kubotppnvdxz\",\"vgtrdcnifmzzs\":\"hlfkqojpy\",\"g\":\"ymbrnysuxmpraf\"},\"id\":\"khocxvdfffwaf\",\"name\":\"roud\",\"type\":\"spave\"}") - .toObject(HybridComputePrivateLinkScopeInner.class); - Assertions.assertEquals("nscliqhzvhxnk", model.location()); - Assertions.assertEquals("kubotppnvdxz", model.tags().get("hihfrbbcevqagtlt")); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.properties().publicNetworkAccess()); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.DISABLED, - model.properties().serviceExtensions().get(0).serviceExtensionPublicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HybridComputePrivateLinkScopeInner model = new HybridComputePrivateLinkScopeInner() - .withLocation("nscliqhzvhxnk") - .withTags(mapOf("hihfrbbcevqagtlt", "kubotppnvdxz", "vgtrdcnifmzzs", "hlfkqojpy", "g", "ymbrnysuxmpraf")) - .withProperties(new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.ENABLED) - .withServiceExtensions(Arrays.asList( - new ServiceExtension() - .withServiceExtensionType( - BinaryData.fromBytes("\"datasgsgbdhu\"".getBytes(StandardCharsets.UTF_8))) - .withServiceExtensionPublicNetworkAccess(ServiceExtensionPublicNetworkAccess.DISABLED), - new ServiceExtension() - .withServiceExtensionType(BinaryData.fromBytes("\"dataj\"".getBytes(StandardCharsets.UTF_8))) - .withServiceExtensionPublicNetworkAccess(ServiceExtensionPublicNetworkAccess.DISABLED)))); - model = BinaryData.fromObject(model).toObject(HybridComputePrivateLinkScopeInner.class); - Assertions.assertEquals("nscliqhzvhxnk", model.location()); - Assertions.assertEquals("kubotppnvdxz", model.tags().get("hihfrbbcevqagtlt")); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.properties().publicNetworkAccess()); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.DISABLED, - model.properties().serviceExtensions().get(0).serviceExtensionPublicNetworkAccess()); - } - - // 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/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HybridComputePrivateLinkScopeListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HybridComputePrivateLinkScopeListResultTests.java deleted file mode 100644 index 8aaa66cf91d8..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HybridComputePrivateLinkScopeListResultTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.HybridComputePrivateLinkScopeListResult; -import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtensionPublicNetworkAccess; -import org.junit.jupiter.api.Assertions; - -public final class HybridComputePrivateLinkScopeListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HybridComputePrivateLinkScopeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"wwnpj\",\"privateLinkScopeId\":\"fz\",\"privateEndpointConnections\":[{\"id\":\"hwahfbousn\",\"name\":\"pgfewetwlyx\",\"type\":\"cxy\",\"properties\":{}},{\"id\":\"djhlimm\",\"name\":\"x\",\"type\":\"bcporxvxcjzhqizx\",\"properties\":{}}],\"serviceExtensions\":[{\"serviceExtensionType\":\"\\\"dataqscjavftjuh\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"},{\"serviceExtensionType\":\"\\\"datak\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Enabled\"},{\"serviceExtensionType\":\"\\\"datauwpijr\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Enabled\"},{\"serviceExtensionType\":\"\\\"datavmmghfcfiwrxgk\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"}]},\"location\":\"yinzqodfvpgs\",\"tags\":{\"vzflbq\":\"gsgbpfgzdjt\"},\"id\":\"gaqvlgafcqusrd\",\"name\":\"etnwsdtutnw\",\"type\":\"duy\"}],\"nextLink\":\"uzhyrmewipmvekdx\"}") - .toObject(HybridComputePrivateLinkScopeListResult.class); - Assertions.assertEquals("yinzqodfvpgs", model.value().get(0).location()); - Assertions.assertEquals("gsgbpfgzdjt", model.value().get(0).tags().get("vzflbq")); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, - model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.DISABLED, - model.value().get(0).properties().serviceExtensions().get(0).serviceExtensionPublicNetworkAccess()); - Assertions.assertEquals("uzhyrmewipmvekdx", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HybridComputePrivateLinkScopePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HybridComputePrivateLinkScopePropertiesTests.java deleted file mode 100644 index 9255ea313597..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HybridComputePrivateLinkScopePropertiesTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScopeProperties; -import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtension; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtensionPublicNetworkAccess; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HybridComputePrivateLinkScopePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HybridComputePrivateLinkScopeProperties model = BinaryData.fromString( - "{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"kbunzoz\",\"privateLinkScopeId\":\"hcxgkmoyx\",\"privateEndpointConnections\":[{\"id\":\"ibhmfdn\",\"name\":\"ydvfvfcjnae\",\"type\":\"srvhmgorffuki\",\"properties\":{\"privateEndpoint\":{\"id\":\"mzhwplefaxvxi\"},\"privateLinkServiceConnectionState\":{\"status\":\"btgn\",\"description\":\"nzeyqxtjj\",\"actionsRequired\":\"qlqhycavodg\"},\"provisioningState\":\"dbeesmie\",\"groupIds\":[\"ra\",\"iaa\",\"iuagydwqfbylyrfg\"]}},{\"id\":\"gtcojocqwo\",\"name\":\"nzjvusfzldm\",\"type\":\"uxylfsbtkadpy\",\"properties\":{\"privateEndpoint\":{\"id\":\"btgkbugrjqctoj\"},\"privateLinkServiceConnectionState\":{\"status\":\"isofieypefojyqd\",\"description\":\"cuplcplcwkhih\",\"actionsRequired\":\"lhzdsqtzb\"},\"provisioningState\":\"gnowcjhfgmveca\",\"groupIds\":[\"mwotey\",\"wcluqovekqvgq\",\"uwifzmpjwyiv\",\"ikf\"]}}],\"serviceExtensions\":[{\"serviceExtensionType\":\"\\\"datarfsphuagrt\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"},{\"serviceExtensionType\":\"\\\"dataeusqczkvyklxu\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"},{\"serviceExtensionType\":\"\\\"dataff\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Enabled\"}]}") - .toObject(HybridComputePrivateLinkScopeProperties.class); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.DISABLED, - model.serviceExtensions().get(0).serviceExtensionPublicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HybridComputePrivateLinkScopeProperties model - = new HybridComputePrivateLinkScopeProperties().withPublicNetworkAccess(PublicNetworkAccessType.ENABLED) - .withServiceExtensions(Arrays.asList( - new ServiceExtension() - .withServiceExtensionType( - BinaryData.fromBytes("\"datarfsphuagrt\"".getBytes(StandardCharsets.UTF_8))) - .withServiceExtensionPublicNetworkAccess(ServiceExtensionPublicNetworkAccess.DISABLED), - new ServiceExtension() - .withServiceExtensionType( - BinaryData.fromBytes("\"dataeusqczkvyklxu\"".getBytes(StandardCharsets.UTF_8))) - .withServiceExtensionPublicNetworkAccess(ServiceExtensionPublicNetworkAccess.DISABLED), - new ServiceExtension() - .withServiceExtensionType(BinaryData.fromBytes("\"dataff\"".getBytes(StandardCharsets.UTF_8))) - .withServiceExtensionPublicNetworkAccess(ServiceExtensionPublicNetworkAccess.ENABLED))); - model = BinaryData.fromObject(model).toObject(HybridComputePrivateLinkScopeProperties.class); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.publicNetworkAccess()); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.DISABLED, - model.serviceExtensions().get(0).serviceExtensionPublicNetworkAccess()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/IdentityTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/IdentityTests.java deleted file mode 100644 index ee8e3ecdb6ac..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/IdentityTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.Identity; -import com.azure.resourcemanager.hybridcompute.models.ResourceIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class IdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Identity model = BinaryData - .fromString("{\"principalId\":\"indoygmifthnzd\",\"tenantId\":\"sl\",\"type\":\"SystemAssigned\"}") - .toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Identity model = new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); - model = BinaryData.fromObject(model).toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/IpAddressTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/IpAddressTests.java deleted file mode 100644 index 893ba1b69536..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/IpAddressTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.IpAddress; -import org.junit.jupiter.api.Assertions; - -public final class IpAddressTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpAddress model = BinaryData - .fromString("{\"address\":\"mjh\",\"ipAddressVersion\":\"j\",\"subnet\":{\"addressPrefix\":\"u\"}}") - .toObject(IpAddress.class); - Assertions.assertEquals("mjh", model.address()); - Assertions.assertEquals("j", model.ipAddressVersion()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseDetailsTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseDetailsTests.java deleted file mode 100644 index ec6745d2343b..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseDetailsTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.ProgramYear; -import com.azure.resourcemanager.hybridcompute.models.VolumeLicenseDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LicenseDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseDetails model = BinaryData.fromString( - "{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":1249241365,\"assignedLicenses\":967174365,\"immutableId\":\"ypnddhsgcb\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 3\",\"invoiceId\":\"koty\"},{\"programYear\":\"Year 2\",\"invoiceId\":\"ulzndlikwyqk\"},{\"programYear\":\"Year 1\",\"invoiceId\":\"bmadgak\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"xybz\"}]}") - .toObject(LicenseDetails.class); - Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); - Assertions.assertEquals(1249241365, model.processors()); - Assertions.assertEquals(ProgramYear.YEAR_3, model.volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("koty", model.volumeLicenseDetails().get(0).invoiceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseDetails model = new LicenseDetails().withState(LicenseState.DEACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.V_CORE) - .withProcessors(1249241365) - .withVolumeLicenseDetails( - Arrays.asList(new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("koty"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("ulzndlikwyqk"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_1).withInvoiceId("bmadgak"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("xybz"))); - model = BinaryData.fromObject(model).toObject(LicenseDetails.class); - Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); - Assertions.assertEquals(1249241365, model.processors()); - Assertions.assertEquals(ProgramYear.YEAR_3, model.volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("koty", model.volumeLicenseDetails().get(0).invoiceId()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseInnerTests.java deleted file mode 100644 index 0d786ebff3b6..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseInnerTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import com.azure.resourcemanager.hybridcompute.models.ProgramYear; -import com.azure.resourcemanager.hybridcompute.models.VolumeLicenseDetails; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class LicenseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Deleting\",\"tenantId\":\"rnfygxgispem\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":1710309731,\"assignedLicenses\":111264928,\"immutableId\":\"fjaeq\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 3\",\"invoiceId\":\"s\"},{\"programYear\":\"Year 1\",\"invoiceId\":\"jqul\"}]}},\"location\":\"sntnbybkzgcw\",\"tags\":{\"vkocrcjdkwtn\":\"lxxwrljdouskc\",\"gls\":\"xbnjbiksq\",\"pee\":\"ainqpjwnzlljfm\"},\"id\":\"vmgxsab\",\"name\":\"yqduujit\",\"type\":\"jczdzevndh\"}") - .toObject(LicenseInner.class); - Assertions.assertEquals("sntnbybkzgcw", model.location()); - Assertions.assertEquals("lxxwrljdouskc", model.tags().get("vkocrcjdkwtn")); - Assertions.assertEquals("rnfygxgispem", model.tenantId()); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.licenseDetails().type()); - Assertions.assertEquals(1710309731, model.licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_3, model.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("s", model.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseInner model = new LicenseInner().withLocation("sntnbybkzgcw") - .withTags(mapOf("vkocrcjdkwtn", "lxxwrljdouskc", "gls", "xbnjbiksq", "pee", "ainqpjwnzlljfm")) - .withTenantId("rnfygxgispem") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails(new LicenseDetails().withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(1710309731) - .withVolumeLicenseDetails( - Arrays.asList(new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("s"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_1).withInvoiceId("jqul")))); - model = BinaryData.fromObject(model).toObject(LicenseInner.class); - Assertions.assertEquals("sntnbybkzgcw", model.location()); - Assertions.assertEquals("lxxwrljdouskc", model.tags().get("vkocrcjdkwtn")); - Assertions.assertEquals("rnfygxgispem", model.tenantId()); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.licenseDetails().type()); - Assertions.assertEquals(1710309731, model.licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_3, model.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("s", model.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); - } - - // 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/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileMachineInstanceViewSoftwareAssuranceTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileMachineInstanceViewSoftwareAssuranceTests.java deleted file mode 100644 index e28b75fc53ef..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileMachineInstanceViewSoftwareAssuranceTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewSoftwareAssurance; -import org.junit.jupiter.api.Assertions; - -public final class LicenseProfileMachineInstanceViewSoftwareAssuranceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseProfileMachineInstanceViewSoftwareAssurance model - = BinaryData.fromString("{\"softwareAssuranceCustomer\":false}") - .toObject(LicenseProfileMachineInstanceViewSoftwareAssurance.class); - Assertions.assertFalse(model.softwareAssuranceCustomer()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilePropertiesSoftwareAssuranceTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilePropertiesSoftwareAssuranceTests.java deleted file mode 100644 index 2733a0aeba54..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilePropertiesSoftwareAssuranceTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfilePropertiesSoftwareAssurance; -import org.junit.jupiter.api.Assertions; - -public final class LicenseProfilePropertiesSoftwareAssuranceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseProfilePropertiesSoftwareAssurance model = BinaryData.fromString("{\"softwareAssuranceCustomer\":true}") - .toObject(LicenseProfilePropertiesSoftwareAssurance.class); - Assertions.assertTrue(model.softwareAssuranceCustomer()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseProfilePropertiesSoftwareAssurance model - = new LicenseProfilePropertiesSoftwareAssurance().withSoftwareAssuranceCustomer(true); - model = BinaryData.fromObject(model).toObject(LicenseProfilePropertiesSoftwareAssurance.class); - Assertions.assertTrue(model.softwareAssuranceCustomer()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdatePropertiesSoftwareAssuranceTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdatePropertiesSoftwareAssuranceTests.java deleted file mode 100644 index 4fb762904394..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdatePropertiesSoftwareAssuranceTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileUpdatePropertiesSoftwareAssurance; -import org.junit.jupiter.api.Assertions; - -public final class LicenseProfileUpdatePropertiesSoftwareAssuranceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseProfileUpdatePropertiesSoftwareAssurance model - = BinaryData.fromString("{\"softwareAssuranceCustomer\":false}") - .toObject(LicenseProfileUpdatePropertiesSoftwareAssurance.class); - Assertions.assertFalse(model.softwareAssuranceCustomer()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseProfileUpdatePropertiesSoftwareAssurance model - = new LicenseProfileUpdatePropertiesSoftwareAssurance().withSoftwareAssuranceCustomer(false); - model = BinaryData.fromObject(model).toObject(LicenseProfileUpdatePropertiesSoftwareAssurance.class); - Assertions.assertFalse(model.softwareAssuranceCustomer()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdatePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdatePropertiesTests.java deleted file mode 100644 index 4bd0d46a27ea..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdatePropertiesTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileUpdateProperties; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; -import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LicenseProfileUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseProfileUpdateProperties model = BinaryData.fromString( - "{\"softwareAssurance\":{\"softwareAssuranceCustomer\":false},\"esuProfile\":{\"assignedLicense\":\"j\"},\"productProfile\":{\"subscriptionStatus\":\"Disable\",\"productType\":\"WindowsServer\",\"productFeatures\":[{\"name\":\"qreyfkzi\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"wneaiv\",\"subscriptionStatus\":\"Disable\"},{\"name\":\"elpcirelsfeaenwa\",\"subscriptionStatus\":\"Disable\"}]}}") - .toObject(LicenseProfileUpdateProperties.class); - Assertions.assertFalse(model.softwareAssuranceCustomer()); - Assertions.assertEquals("j", model.assignedLicense()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); - Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); - Assertions.assertEquals("qreyfkzi", model.productFeatures().get(0).name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, - model.productFeatures().get(0).subscriptionStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseProfileUpdateProperties model = new LicenseProfileUpdateProperties().withSoftwareAssuranceCustomer(false) - .withAssignedLicense("j") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE) - .withProductType(LicenseProfileProductType.WINDOWS_SERVER) - .withProductFeatures(Arrays.asList( - new ProductFeatureUpdate().withName("qreyfkzi") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE), - new ProductFeatureUpdate().withName("wneaiv") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE), - new ProductFeatureUpdate().withName("elpcirelsfeaenwa") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE))); - model = BinaryData.fromObject(model).toObject(LicenseProfileUpdateProperties.class); - Assertions.assertFalse(model.softwareAssuranceCustomer()); - Assertions.assertEquals("j", model.assignedLicense()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); - Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); - Assertions.assertEquals("qreyfkzi", model.productFeatures().get(0).name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, - model.productFeatures().get(0).subscriptionStatus()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdateTests.java deleted file mode 100644 index 30a66d4bcb80..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdateTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileUpdate; -import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class LicenseProfileUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseProfileUpdate model = BinaryData.fromString( - "{\"properties\":{\"softwareAssurance\":{\"softwareAssuranceCustomer\":true},\"esuProfile\":{\"assignedLicense\":\"xxmueedn\"},\"productProfile\":{\"subscriptionStatus\":\"Enable\",\"productType\":\"WindowsIoTEnterprise\",\"productFeatures\":[{\"name\":\"qtc\",\"subscriptionStatus\":\"Enable\"}]}},\"tags\":{\"ohgwxrtfudxepxg\":\"fmtdaaygdvwvgp\",\"pkukghi\":\"qagvrvm\",\"wi\":\"dblx\"}}") - .toObject(LicenseProfileUpdate.class); - Assertions.assertEquals("fmtdaaygdvwvgp", model.tags().get("ohgwxrtfudxepxg")); - Assertions.assertTrue(model.softwareAssuranceCustomer()); - Assertions.assertEquals("xxmueedn", model.assignedLicense()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); - Assertions.assertEquals(LicenseProfileProductType.WINDOWS_IO_TENTERPRISE, model.productType()); - Assertions.assertEquals("qtc", model.productFeatures().get(0).name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, - model.productFeatures().get(0).subscriptionStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseProfileUpdate model = new LicenseProfileUpdate() - .withTags(mapOf("ohgwxrtfudxepxg", "fmtdaaygdvwvgp", "pkukghi", "qagvrvm", "wi", "dblx")) - .withSoftwareAssuranceCustomer(true) - .withAssignedLicense("xxmueedn") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE) - .withProductType(LicenseProfileProductType.WINDOWS_IO_TENTERPRISE) - .withProductFeatures(Arrays.asList(new ProductFeatureUpdate().withName("qtc") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE))); - model = BinaryData.fromObject(model).toObject(LicenseProfileUpdate.class); - Assertions.assertEquals("fmtdaaygdvwvgp", model.tags().get("ohgwxrtfudxepxg")); - Assertions.assertTrue(model.softwareAssuranceCustomer()); - Assertions.assertEquals("xxmueedn", model.assignedLicense()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); - Assertions.assertEquals(LicenseProfileProductType.WINDOWS_IO_TENTERPRISE, model.productType()); - Assertions.assertEquals("qtc", model.productFeatures().get(0).name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, - model.productFeatures().get(0).subscriptionStatus()); - } - - // 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/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensePropertiesTests.java deleted file mode 100644 index e63bdc20ed85..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensePropertiesTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProperties; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import com.azure.resourcemanager.hybridcompute.models.ProgramYear; -import com.azure.resourcemanager.hybridcompute.models.VolumeLicenseDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LicensePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Accepted\",\"tenantId\":\"d\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":1914162243,\"assignedLicenses\":2141844336,\"immutableId\":\"nhutjeltmrldhugj\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 2\",\"invoiceId\":\"xhocdgeablgphuti\"},{\"programYear\":\"Year 1\",\"invoiceId\":\"kao\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"ftyhxhurokf\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"lniwpwcukjfkgiaw\"}]}}") - .toObject(LicenseProperties.class); - Assertions.assertEquals("d", model.tenantId()); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, model.licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.STANDARD, model.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, model.licenseDetails().type()); - Assertions.assertEquals(1914162243, model.licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_2, model.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("xhocdgeablgphuti", model.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseProperties model = new LicenseProperties().withTenantId("d") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails(new LicenseDetails().withState(LicenseState.DEACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) - .withEdition(LicenseEdition.STANDARD) - .withType(LicenseCoreType.V_CORE) - .withProcessors(1914162243) - .withVolumeLicenseDetails(Arrays.asList( - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("xhocdgeablgphuti"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_1).withInvoiceId("kao"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("ftyhxhurokf"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("lniwpwcukjfkgiaw")))); - model = BinaryData.fromObject(model).toObject(LicenseProperties.class); - Assertions.assertEquals("d", model.tenantId()); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, model.licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.STANDARD, model.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, model.licenseDetails().type()); - Assertions.assertEquals(1914162243, model.licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_2, model.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("xhocdgeablgphuti", model.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesLicenseDetailsTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesLicenseDetailsTests.java deleted file mode 100644 index 53ef27373a06..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesLicenseDetailsTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseUpdatePropertiesLicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import org.junit.jupiter.api.Assertions; - -public final class LicenseUpdatePropertiesLicenseDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseUpdatePropertiesLicenseDetails model = BinaryData.fromString( - "{\"state\":\"Activated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":931696713}") - .toObject(LicenseUpdatePropertiesLicenseDetails.class); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); - Assertions.assertEquals(931696713, model.processors()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseUpdatePropertiesLicenseDetails model - = new LicenseUpdatePropertiesLicenseDetails().withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.V_CORE) - .withProcessors(931696713); - model = BinaryData.fromObject(model).toObject(LicenseUpdatePropertiesLicenseDetails.class); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); - Assertions.assertEquals(931696713, model.processors()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesTests.java deleted file mode 100644 index 3e51d412dbf5..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseUpdateProperties; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import org.junit.jupiter.api.Assertions; - -public final class LicenseUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseUpdateProperties model = BinaryData.fromString( - "{\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":2030092975}}") - .toObject(LicenseUpdateProperties.class); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(2030092975, model.processors()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseUpdateProperties model = new LicenseUpdateProperties().withLicenseType(LicenseType.ESU) - .withState(LicenseState.DEACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(2030092975); - model = BinaryData.fromObject(model).toObject(LicenseUpdateProperties.class); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(2030092975, model.processors()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdateTests.java deleted file mode 100644 index 83fe17e41856..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdateTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import com.azure.resourcemanager.hybridcompute.models.LicenseUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class LicenseUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseUpdate model = BinaryData.fromString( - "{\"properties\":{\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":269319267}},\"tags\":{\"utduqktapspwgcu\":\"ougpbkwt\",\"hbmdgbbjfdd\":\"rtumkdosvq\"}}") - .toObject(LicenseUpdate.class); - Assertions.assertEquals("ougpbkwt", model.tags().get("utduqktapspwgcu")); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(269319267, model.processors()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseUpdate model - = new LicenseUpdate().withTags(mapOf("utduqktapspwgcu", "ougpbkwt", "hbmdgbbjfdd", "rtumkdosvq")) - .withLicenseType(LicenseType.ESU) - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(269319267); - model = BinaryData.fromObject(model).toObject(LicenseUpdate.class); - Assertions.assertEquals("ougpbkwt", model.tags().get("utduqktapspwgcu")); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(269319267, model.processors()); - } - - // 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/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateMockTests.java index 7c3b633b9d20..236aefe2b0eb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -32,7 +32,7 @@ public final class LicensesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"winhehfqpo\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":599234170,\"assignedLicenses\":1095491219,\"immutableId\":\"xk\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 3\",\"invoiceId\":\"ebwtswb\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"m\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"gegizvcjfel\"},{\"programYear\":\"Year 1\",\"invoiceId\":\"ubggbqigkxkb\"}]}},\"location\":\"zgakgacyrcmj\",\"tags\":{\"uhrylniofr\":\"pofap\",\"l\":\"gbzjedmstkv\",\"f\":\"xbcuiiznkt\"},\"id\":\"nsnvpd\",\"name\":\"bmikost\",\"type\":\"z\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"pfbcunezzcez\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":433399705,\"assignedLicenses\":1750029451,\"immutableId\":\"ihclafzv\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 2\",\"invoiceId\":\"sqqw\"}]}},\"location\":\"cmwqkchcxwa\",\"tags\":{\"jkjexf\":\"w\",\"hkbffmbm\":\"eqvhpsylkk\",\"gjxsnptfu\":\"zjrgyww\"},\"id\":\"gicgaaoepttaq\",\"name\":\"tdewemxswvruu\",\"type\":\"zzjgehkfki\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -42,36 +42,36 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); License response = manager.licenses() - .define("tzh") - .withRegion("ivmxyasfl") - .withExistingResourceGroup("dwfmvigorqjb") - .withTags(mapOf("ihknsmjbl", "gzwywak", "ryuzcbmqqv", "ljhlnymzotq", "fgtayxonsup", "mv", "oibgsxg", - "ujlzqnhcvsqltn")) - .withTenantId("afhonqj") + .define("kbwvqvxkdiv") + .withRegion("zjedmstkvnlv") + .withExistingResourceGroup("bcblemb") + .withTags(mapOf("bmikost", "uiiznktwfansnvpd")) + .withTenantId("wtswbzuwfmdur") .withLicenseType(LicenseType.ESU) .withLicenseDetails(new LicenseDetails().withState(LicenseState.DEACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.STANDARD) - .withType(LicenseCoreType.P_CORE) - .withProcessors(1310159143) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) + .withEdition(LicenseEdition.DATACENTER) + .withType(LicenseCoreType.V_CORE) + .withProcessors(2118325917) .withVolumeLicenseDetails(Arrays.asList( - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("xxmlfmkqscazua"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("x"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_1).withInvoiceId("wabzxrvxcushsp")))) + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("sazgakgacyrcmj"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_1).withInvoiceId("of"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("hryl"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("rz")))) .create(); - Assertions.assertEquals("zgakgacyrcmj", response.location()); - Assertions.assertEquals("pofap", response.tags().get("uhrylniofr")); - Assertions.assertEquals("winhehfqpo", response.tenantId()); + Assertions.assertEquals("cmwqkchcxwa", response.location()); + Assertions.assertEquals("w", response.tags().get("jkjexf")); + Assertions.assertEquals("pfbcunezzcez", response.tenantId()); Assertions.assertEquals(LicenseType.ESU, response.licenseType()); Assertions.assertEquals(LicenseState.DEACTIVATED, response.licenseDetails().state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, response.licenseDetails().target()); Assertions.assertEquals(LicenseEdition.STANDARD, response.licenseDetails().edition()); Assertions.assertEquals(LicenseCoreType.V_CORE, response.licenseDetails().type()); - Assertions.assertEquals(599234170, response.licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_3, + Assertions.assertEquals(433399705, response.licenseDetails().processors()); + Assertions.assertEquals(ProgramYear.YEAR_2, response.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("ebwtswb", response.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); + Assertions.assertEquals("sqqw", response.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); } // Use "Map.of" if available diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteMockTests.java index 3efb235a01f6..3fbee83f2840 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.licenses().delete("hnmgixhcm", "vmqfoud", com.azure.core.util.Context.NONE); + manager.licenses().delete("ptgoeiybbabp", "hv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupWithResponseMockTests.java index f36d4c8efb9a..54602d0a936c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -27,7 +27,7 @@ public final class LicensesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"tenantId\":\"omfgbeglqgleohib\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":653076668,\"assignedLicenses\":336886456,\"immutableId\":\"ij\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 1\",\"invoiceId\":\"qzbqqxlajrnwxa\"},{\"programYear\":\"Year 2\",\"invoiceId\":\"h\"}]}},\"location\":\"uyxoaf\",\"tags\":{\"inmfgvxirp\":\"qltfaey\",\"prlpy\":\"hriypoqeyhlqhy\"},\"id\":\"nuciqdsmexiit\",\"name\":\"fuxtyasiibmiybnn\",\"type\":\"stgnl\"}"; + = "{\"properties\":{\"provisioningState\":\"Updating\",\"tenantId\":\"fxapjwogqqnobpu\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":1935612973,\"assignedLicenses\":1150398626,\"immutableId\":\"qbucljgkyexaoguy\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 1\",\"invoiceId\":\"daultxijjumfq\"}]}},\"location\":\"z\",\"tags\":{\"jng\":\"nm\",\"bjwgnyfus\":\"qdqx\",\"fh\":\"zsvtuikzhajqgl\"},\"id\":\"l\",\"name\":\"qryxyn\",\"type\":\"nzrdpsovwxz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,20 +37,20 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); License response = manager.licenses() - .getByResourceGroupWithResponse("evy", "yhsgz", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("wjwiuub", "efqsfapaqtferrqw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("uyxoaf", response.location()); - Assertions.assertEquals("qltfaey", response.tags().get("inmfgvxirp")); - Assertions.assertEquals("omfgbeglqgleohib", response.tenantId()); + Assertions.assertEquals("z", response.location()); + Assertions.assertEquals("nm", response.tags().get("jng")); + Assertions.assertEquals("fxapjwogqqnobpu", response.tenantId()); Assertions.assertEquals(LicenseType.ESU, response.licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, response.licenseDetails().state()); + Assertions.assertEquals(LicenseState.ACTIVATED, response.licenseDetails().state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, response.licenseDetails().target()); Assertions.assertEquals(LicenseEdition.DATACENTER, response.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, response.licenseDetails().type()); - Assertions.assertEquals(653076668, response.licenseDetails().processors()); + Assertions.assertEquals(LicenseCoreType.P_CORE, response.licenseDetails().type()); + Assertions.assertEquals(1935612973, response.licenseDetails().processors()); Assertions.assertEquals(ProgramYear.YEAR_1, response.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("qzbqqxlajrnwxa", response.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); + Assertions.assertEquals("daultxijjumfq", response.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupMockTests.java index 294041800c6f..618f81cf7fc4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -28,7 +28,7 @@ public final class LicensesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"tenantId\":\"otwypundmb\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":519028408,\"assignedLicenses\":1939328666,\"immutableId\":\"tp\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 2\",\"invoiceId\":\"ltfvnz\"},{\"programYear\":\"Year 1\",\"invoiceId\":\"otp\"}]}},\"location\":\"pvpbdbzqgqqiheds\",\"tags\":{\"ysi\":\"thmkyib\",\"sdtmcdzs\":\"sgqcwdho\"},\"id\":\"fcohdxbzlmcmu\",\"name\":\"pcvhdbevwqqxeys\",\"type\":\"onqzinkfkbgbzbow\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"tenantId\":\"s\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":1683958424,\"assignedLicenses\":1611438793,\"immutableId\":\"mifrygznmma\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 3\",\"invoiceId\":\"obgop\"},{\"programYear\":\"Year 2\",\"invoiceId\":\"lnelxieixynl\"}]}},\"location\":\"ecwcrojphslhcawj\",\"tags\":{\"ttzhra\":\"fdwfmvigorqj\"},\"id\":\"lkafhonqjuje\",\"name\":\"ckpzvcpopmxeln\",\"type\":\"clt\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,21 +38,21 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.licenses().listByResourceGroup("rhc", com.azure.core.util.Context.NONE); + = manager.licenses().listByResourceGroup("slkvntjl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("pvpbdbzqgqqiheds", response.iterator().next().location()); - Assertions.assertEquals("thmkyib", response.iterator().next().tags().get("ysi")); - Assertions.assertEquals("otwypundmb", response.iterator().next().tenantId()); + Assertions.assertEquals("ecwcrojphslhcawj", response.iterator().next().location()); + Assertions.assertEquals("fdwfmvigorqj", response.iterator().next().tags().get("ttzhra")); + Assertions.assertEquals("s", response.iterator().next().tenantId()); Assertions.assertEquals(LicenseType.ESU, response.iterator().next().licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, response.iterator().next().licenseDetails().state()); + Assertions.assertEquals(LicenseState.ACTIVATED, response.iterator().next().licenseDetails().state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, response.iterator().next().licenseDetails().target()); Assertions.assertEquals(LicenseEdition.STANDARD, response.iterator().next().licenseDetails().edition()); Assertions.assertEquals(LicenseCoreType.V_CORE, response.iterator().next().licenseDetails().type()); - Assertions.assertEquals(519028408, response.iterator().next().licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_2, + Assertions.assertEquals(1683958424, response.iterator().next().licenseDetails().processors()); + Assertions.assertEquals(ProgramYear.YEAR_3, response.iterator().next().licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("ltfvnz", + Assertions.assertEquals("obgop", response.iterator().next().licenseDetails().volumeLicenseDetails().get(0).invoiceId()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListMockTests.java index 0f7cff981429..60d448b30356 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -28,7 +28,7 @@ public final class LicensesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"tenantId\":\"ljmygvkzqkjjeokb\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":1442604370,\"assignedLicenses\":1208921361,\"immutableId\":\"q\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 2\",\"invoiceId\":\"gnzvdfbzdixzm\"}]}},\"location\":\"noda\",\"tags\":{\"tmcg\":\"qhewj\"},\"id\":\"bostzel\",\"name\":\"dlat\",\"type\":\"tmzlbiojlv\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleted\",\"tenantId\":\"xxmlfmkqscazua\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":1322793238,\"assignedLicenses\":1568723374,\"immutableId\":\"cush\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 1\",\"invoiceId\":\"mxyasflvgsgzw\"},{\"programYear\":\"Year 2\",\"invoiceId\":\"oi\"}]}},\"location\":\"nsmjbl\",\"tags\":{\"ryuzcbmqqv\":\"hlnymzotq\",\"fgtayxonsup\":\"mv\",\"oibgsxg\":\"ujlzqnhcvsqltn\",\"dbxiqx\":\"xfyqonmpqoxwdo\"},\"id\":\"iiqbi\",\"name\":\"htmwwinh\",\"type\":\"hfqpofv\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -39,19 +39,19 @@ public void testList() throws Exception { PagedIterable response = manager.licenses().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("noda", response.iterator().next().location()); - Assertions.assertEquals("qhewj", response.iterator().next().tags().get("tmcg")); - Assertions.assertEquals("ljmygvkzqkjjeokb", response.iterator().next().tenantId()); + Assertions.assertEquals("nsmjbl", response.iterator().next().location()); + Assertions.assertEquals("hlnymzotq", response.iterator().next().tags().get("ryuzcbmqqv")); + Assertions.assertEquals("xxmlfmkqscazua", response.iterator().next().tenantId()); Assertions.assertEquals(LicenseType.ESU, response.iterator().next().licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, response.iterator().next().licenseDetails().state()); + Assertions.assertEquals(LicenseState.DEACTIVATED, response.iterator().next().licenseDetails().state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, response.iterator().next().licenseDetails().target()); Assertions.assertEquals(LicenseEdition.DATACENTER, response.iterator().next().licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, response.iterator().next().licenseDetails().type()); - Assertions.assertEquals(1442604370, response.iterator().next().licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_2, + Assertions.assertEquals(LicenseCoreType.V_CORE, response.iterator().next().licenseDetails().type()); + Assertions.assertEquals(1322793238, response.iterator().next().licenseDetails().processors()); + Assertions.assertEquals(ProgramYear.YEAR_1, response.iterator().next().licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("gnzvdfbzdixzm", + Assertions.assertEquals("mxyasflvgsgzw", response.iterator().next().licenseDetails().volumeLicenseDetails().get(0).invoiceId()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListResultTests.java deleted file mode 100644 index 1a65f4fefefa..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListResultTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.LicensesListResult; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import org.junit.jupiter.api.Assertions; - -public final class LicensesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicensesListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"tenantId\":\"rwzwbng\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"pCore\",\"processors\":2085813380,\"assignedLicenses\":1785230840,\"immutableId\":\"ckyfih\",\"volumeLicenseDetails\":[{}]}},\"location\":\"fvzwdzuhty\",\"tags\":{\"hwxmnteiwa\":\"sdkf\",\"fsrpymzidnse\":\"pvkmijcmmxdcuf\",\"yc\":\"cxtbzsg\",\"mdwzjeiachboo\":\"sne\"},\"id\":\"flnrosfqpteehzz\",\"name\":\"ypyqrimzinp\",\"type\":\"swjdkirso\"},{\"properties\":{\"provisioningState\":\"Updating\",\"tenantId\":\"crmnohjtckwhds\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":305991846,\"assignedLicenses\":1745012862,\"immutableId\":\"znorcj\",\"volumeLicenseDetails\":[{}]}},\"location\":\"byxqabn\",\"tags\":{\"zafb\":\"pcyshu\"},\"id\":\"jjgpb\",\"name\":\"oq\",\"type\":\"jmkljavbqidtqajz\"}],\"nextLink\":\"l\"}") - .toObject(LicensesListResult.class); - Assertions.assertEquals("fvzwdzuhty", model.value().get(0).location()); - Assertions.assertEquals("sdkf", model.value().get(0).tags().get("hwxmnteiwa")); - Assertions.assertEquals("rwzwbng", model.value().get(0).tenantId()); - Assertions.assertEquals(LicenseType.ESU, model.value().get(0).licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.value().get(0).licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.value().get(0).licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.STANDARD, model.value().get(0).licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.value().get(0).licenseDetails().type()); - Assertions.assertEquals(2085813380, model.value().get(0).licenseDetails().processors()); - Assertions.assertEquals("l", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseMockTests.java index b1de3a2552a8..f086a03e3be1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -33,7 +33,7 @@ public final class LicensesValidateLicenseMockTests { @Test public void testValidateLicense() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"waz\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":1855012181,\"assignedLicenses\":260855518,\"immutableId\":\"wgnyfusfzsvtui\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 3\",\"invoiceId\":\"glcfhmlrqryxyn\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"dpsovwxznptgo\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"b\"}]}},\"location\":\"pfhvfslk\",\"tags\":{\"dsxwaab\":\"jlrigjkskyrioovz\",\"ri\":\"mifrygznmma\",\"lxieixynllxecwcr\":\"kzobgopxlhsln\"},\"id\":\"jphslhcaw\",\"name\":\"u\",\"type\":\"i\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"kjjeokbz\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":22024155,\"assignedLicenses\":1572244952,\"immutableId\":\"xbkwv\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 1\",\"invoiceId\":\"fbzdixzmqpnoda\"},{\"programYear\":\"Year 2\",\"invoiceId\":\"hewjptmcgsbost\"},{\"programYear\":\"Year 1\",\"invoiceId\":\"dlat\"},{\"programYear\":\"Year 2\",\"invoiceId\":\"lbiojlvfhrb\"}]}},\"location\":\"neqvcwwyyurmo\",\"tags\":{\"ejnhlbkpb\":\"prprsnmokay\"},\"id\":\"pcpil\",\"name\":\"hahzvechndbnwi\",\"type\":\"hol\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -44,33 +44,34 @@ public void testValidateLicense() throws Exception { License response = manager.licenses() .validateLicense( - new LicenseInner().withLocation("bnwieholew") - .withTags(mapOf("fqsfa", "uubw", "wexjkmfxapjwogq", "aqtferr", "awbzasqb", "nobpudcdabtqwpw")) - .withTenantId("pn") + new LicenseInner().withLocation("ohdxbzlmcmu") + .withTags(mapOf("ko", "vhdbevwqqxey")) + .withTenantId("dtzfjltfvnzcy") .withLicenseType(LicenseType.ESU) .withLicenseDetails(new LicenseDetails().withState(LicenseState.ACTIVATED) .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) - .withEdition(LicenseEdition.STANDARD) - .withType(LicenseCoreType.P_CORE) - .withProcessors(1025978620) + .withEdition(LicenseEdition.DATACENTER) + .withType(LicenseCoreType.V_CORE) + .withProcessors(369514238) .withVolumeLicenseDetails(Arrays.asList( - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("z"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_1).withInvoiceId("ljhah"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("h")))), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_1).withInvoiceId("qwthmky"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3) + .withInvoiceId("sihsgqcwdhohsd"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_1).withInvoiceId("zsu")))), com.azure.core.util.Context.NONE); - Assertions.assertEquals("pfhvfslk", response.location()); - Assertions.assertEquals("jlrigjkskyrioovz", response.tags().get("dsxwaab")); - Assertions.assertEquals("waz", response.tenantId()); + Assertions.assertEquals("neqvcwwyyurmo", response.location()); + Assertions.assertEquals("prprsnmokay", response.tags().get("ejnhlbkpb")); + Assertions.assertEquals("kjjeokbz", response.tenantId()); Assertions.assertEquals(LicenseType.ESU, response.licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, response.licenseDetails().state()); + Assertions.assertEquals(LicenseState.ACTIVATED, response.licenseDetails().state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, response.licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.STANDARD, response.licenseDetails().edition()); + Assertions.assertEquals(LicenseEdition.DATACENTER, response.licenseDetails().edition()); Assertions.assertEquals(LicenseCoreType.V_CORE, response.licenseDetails().type()); - Assertions.assertEquals(1855012181, response.licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_3, + Assertions.assertEquals(22024155, response.licenseDetails().processors()); + Assertions.assertEquals(ProgramYear.YEAR_1, response.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("glcfhmlrqryxyn", response.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); + Assertions.assertEquals("fbzdixzmqpnoda", response.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); } // Use "Map.of" if available diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LinuxParametersTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LinuxParametersTests.java deleted file mode 100644 index 719564949181..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LinuxParametersTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.LinuxParameters; -import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationLinux; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LinuxParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinuxParameters model = BinaryData.fromString( - "{\"classificationsToInclude\":[\"Critical\"],\"packageNameMasksToInclude\":[\"uiizynke\",\"yatrwy\",\"q\",\"ibzyhwitsmyp\"],\"packageNameMasksToExclude\":[\"pcdpumnz\",\"mwzn\",\"abikns\"]}") - .toObject(LinuxParameters.class); - Assertions.assertEquals(VMGuestPatchClassificationLinux.CRITICAL, model.classificationsToInclude().get(0)); - Assertions.assertEquals("uiizynke", model.packageNameMasksToInclude().get(0)); - Assertions.assertEquals("pcdpumnz", model.packageNameMasksToExclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinuxParameters model = new LinuxParameters() - .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationLinux.CRITICAL)) - .withPackageNameMasksToInclude(Arrays.asList("uiizynke", "yatrwy", "q", "ibzyhwitsmyp")) - .withPackageNameMasksToExclude(Arrays.asList("pcdpumnz", "mwzn", "abikns")); - model = BinaryData.fromObject(model).toObject(LinuxParameters.class); - Assertions.assertEquals(VMGuestPatchClassificationLinux.CRITICAL, model.classificationsToInclude().get(0)); - Assertions.assertEquals("uiizynke", model.packageNameMasksToInclude().get(0)); - Assertions.assertEquals("pcdpumnz", model.packageNameMasksToExclude().get(0)); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LocationDataTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LocationDataTests.java deleted file mode 100644 index efeb82f1ed59..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LocationDataTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.LocationData; -import org.junit.jupiter.api.Assertions; - -public final class LocationDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LocationData model = BinaryData.fromString( - "{\"name\":\"oqqnwvlryav\",\"city\":\"heun\",\"district\":\"qhgyxzkonocukok\",\"countryOrRegion\":\"axuconuq\"}") - .toObject(LocationData.class); - Assertions.assertEquals("oqqnwvlryav", model.name()); - Assertions.assertEquals("heun", model.city()); - Assertions.assertEquals("qhgyxzkonocukok", model.district()); - Assertions.assertEquals("axuconuq", model.countryOrRegion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LocationData model = new LocationData().withName("oqqnwvlryav") - .withCity("heun") - .withDistrict("qhgyxzkonocukok") - .withCountryOrRegion("axuconuq"); - model = BinaryData.fromObject(model).toObject(LocationData.class); - Assertions.assertEquals("oqqnwvlryav", model.name()); - Assertions.assertEquals("heun", model.city()); - Assertions.assertEquals("qhgyxzkonocukok", model.district()); - Assertions.assertEquals("axuconuq", model.countryOrRegion()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpdatePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpdatePropertiesTests.java deleted file mode 100644 index 8b9f7e790832..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpdatePropertiesTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionUpdateProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MachineExtensionUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MachineExtensionUpdateProperties model = BinaryData.fromString( - "{\"forceUpdateTag\":\"tdwkqbrq\",\"publisher\":\"paxh\",\"type\":\"iilivpdtiirqtd\",\"typeHandlerVersion\":\"axoruzfgsquy\",\"enableAutomaticUpgrade\":false,\"autoUpgradeMinorVersion\":true,\"settings\":{\"zwl\":\"\\\"dataptramxj\\\"\",\"tdooaoj\":\"\\\"datanwxuqlcvydyp\\\"\"},\"protectedSettings\":{\"ebwnujhe\":\"\\\"dataodko\\\"\",\"jlfltkacjvefkdlf\":\"\\\"datamsbvdkcrodtjinf\\\"\",\"owpulpq\":\"\\\"dataakggkfpag\\\"\",\"xkqjnsjervt\":\"\\\"datalyls\\\"\"}}") - .toObject(MachineExtensionUpdateProperties.class); - Assertions.assertEquals("tdwkqbrq", model.forceUpdateTag()); - Assertions.assertEquals("paxh", model.publisher()); - Assertions.assertEquals("iilivpdtiirqtd", model.type()); - Assertions.assertEquals("axoruzfgsquy", model.typeHandlerVersion()); - Assertions.assertFalse(model.enableAutomaticUpgrade()); - Assertions.assertTrue(model.autoUpgradeMinorVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MachineExtensionUpdateProperties model = new MachineExtensionUpdateProperties().withForceUpdateTag("tdwkqbrq") - .withPublisher("paxh") - .withType("iilivpdtiirqtd") - .withTypeHandlerVersion("axoruzfgsquy") - .withEnableAutomaticUpgrade(false) - .withAutoUpgradeMinorVersion(true) - .withSettings(mapOf("zwl", "\"dataptramxj\"", "tdooaoj", "\"datanwxuqlcvydyp\"")) - .withProtectedSettings(mapOf("ebwnujhe", "\"dataodko\"", "jlfltkacjvefkdlf", "\"datamsbvdkcrodtjinf\"", - "owpulpq", "\"dataakggkfpag\"", "xkqjnsjervt", "\"datalyls\"")); - model = BinaryData.fromObject(model).toObject(MachineExtensionUpdateProperties.class); - Assertions.assertEquals("tdwkqbrq", model.forceUpdateTag()); - Assertions.assertEquals("paxh", model.publisher()); - Assertions.assertEquals("iilivpdtiirqtd", model.type()); - Assertions.assertEquals("axoruzfgsquy", model.typeHandlerVersion()); - Assertions.assertFalse(model.enableAutomaticUpgrade()); - Assertions.assertTrue(model.autoUpgradeMinorVersion()); - } - - // 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/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpdateTests.java deleted file mode 100644 index d38dbcdada56..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpdateTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MachineExtensionUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MachineExtensionUpdate model = BinaryData.fromString( - "{\"properties\":{\"forceUpdateTag\":\"ebdunyg\",\"publisher\":\"qidbqfatpxllrxcy\",\"type\":\"oadsuvar\",\"typeHandlerVersion\":\"wdmjsjqbjhhyx\",\"enableAutomaticUpgrade\":true,\"autoUpgradeMinorVersion\":false,\"settings\":{\"kgymareqnajxqug\":\"\\\"dataduhpk\\\"\",\"ubeddg\":\"\\\"datahky\\\"\"},\"protectedSettings\":{\"i\":\"\\\"datafwqmzqalkrmn\\\"\"}},\"tags\":{\"yvayffimrzr\":\"acqqudfnbyxbaaab\",\"nwnwme\":\"uzqogsexnevf\",\"bjudpfrxtrthzv\":\"zsyyceuzso\"}}") - .toObject(MachineExtensionUpdate.class); - Assertions.assertEquals("acqqudfnbyxbaaab", model.tags().get("yvayffimrzr")); - Assertions.assertEquals("ebdunyg", model.forceUpdateTag()); - Assertions.assertEquals("qidbqfatpxllrxcy", model.publisher()); - Assertions.assertEquals("oadsuvar", model.type()); - Assertions.assertEquals("wdmjsjqbjhhyx", model.typeHandlerVersion()); - Assertions.assertTrue(model.enableAutomaticUpgrade()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MachineExtensionUpdate model = new MachineExtensionUpdate() - .withTags( - mapOf("yvayffimrzr", "acqqudfnbyxbaaab", "nwnwme", "uzqogsexnevf", "bjudpfrxtrthzv", "zsyyceuzso")) - .withForceUpdateTag("ebdunyg") - .withPublisher("qidbqfatpxllrxcy") - .withType("oadsuvar") - .withTypeHandlerVersion("wdmjsjqbjhhyx") - .withEnableAutomaticUpgrade(true) - .withAutoUpgradeMinorVersion(false) - .withSettings(mapOf("kgymareqnajxqug", "\"dataduhpk\"", "ubeddg", "\"datahky\"")) - .withProtectedSettings(mapOf("i", "\"datafwqmzqalkrmn\"")); - model = BinaryData.fromObject(model).toObject(MachineExtensionUpdate.class); - Assertions.assertEquals("acqqudfnbyxbaaab", model.tags().get("yvayffimrzr")); - Assertions.assertEquals("ebdunyg", model.forceUpdateTag()); - Assertions.assertEquals("qidbqfatpxllrxcy", model.publisher()); - Assertions.assertEquals("oadsuvar", model.type()); - Assertions.assertEquals("wdmjsjqbjhhyx", model.typeHandlerVersion()); - Assertions.assertTrue(model.enableAutomaticUpgrade()); - Assertions.assertFalse(model.autoUpgradeMinorVersion()); - } - - // 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/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpgradeTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpgradeTests.java deleted file mode 100644 index 1e68a52bf511..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpgradeTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ExtensionTargetProperties; -import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpgrade; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MachineExtensionUpgradeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MachineExtensionUpgrade model = BinaryData.fromString( - "{\"extensionTargets\":{\"mtz\":{\"targetVersion\":\"quvgjxpybczme\"},\"hphoycm\":{\"targetVersion\":\"bsphrupidgsybbe\"},\"hdxbmtqio\":{\"targetVersion\":\"ao\"}}}") - .toObject(MachineExtensionUpgrade.class); - Assertions.assertEquals("quvgjxpybczme", model.extensionTargets().get("mtz").targetVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MachineExtensionUpgrade model = new MachineExtensionUpgrade() - .withExtensionTargets(mapOf("mtz", new ExtensionTargetProperties().withTargetVersion("quvgjxpybczme"), - "hphoycm", new ExtensionTargetProperties().withTargetVersion("bsphrupidgsybbe"), "hdxbmtqio", - new ExtensionTargetProperties().withTargetVersion("ao"))); - model = BinaryData.fromObject(model).toObject(MachineExtensionUpgrade.class); - Assertions.assertEquals("quvgjxpybczme", model.extensionTargets().get("mtz").targetVersion()); - } - - // 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/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsDeleteMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsDeleteMockTests.java index f9ea68f8113a..0b3e70ab7cbb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsDeleteMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsDeleteMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.machineExtensions().delete("ujdjltymkmvg", "ihywartspph", "ixkykxd", com.azure.core.util.Context.NONE); + manager.machineExtensions().delete("bh", "vbmxuqibsx", "kcudfbsfarfsiowl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineInstallPatchesParametersTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineInstallPatchesParametersTests.java deleted file mode 100644 index be37bf1b815e..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineInstallPatchesParametersTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.LinuxParameters; -import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters; -import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationLinux; -import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationWindows; -import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchRebootSetting; -import com.azure.resourcemanager.hybridcompute.models.WindowsParameters; -import java.time.Duration; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MachineInstallPatchesParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MachineInstallPatchesParameters model = BinaryData.fromString( - "{\"maximumDuration\":\"PT134H36S\",\"rebootSetting\":\"Never\",\"windowsParameters\":{\"classificationsToInclude\":[\"UpdateRollUp\",\"Security\",\"Critical\",\"ServicePack\"],\"kbNumbersToInclude\":[\"qgxy\"],\"kbNumbersToExclude\":[\"cmbqfqvmk\",\"xozap\",\"helxprglya\",\"dd\"],\"excludeKbsRequiringReboot\":true,\"maxPatchPublishDate\":\"2021-12-06T09:13:13Z\",\"patchNameMasksToInclude\":[\"jrjxgciqibrhosx\",\"dqrhzoymib\",\"rq\",\"ibahwflus\"],\"patchNameMasksToExclude\":[\"mhrkwofyyvoqacp\",\"expbtg\",\"wbwo\",\"nwashrtd\"]},\"linuxParameters\":{\"classificationsToInclude\":[\"Other\",\"Other\"],\"packageNameMasksToInclude\":[\"p\",\"kulpiujwaasi\",\"qiiobyuqer\",\"qlpqwcciuq\"],\"packageNameMasksToExclude\":[\"butauvfb\",\"kuwhh\",\"hykojoxafnndlpic\",\"koymkcd\"]}}") - .toObject(MachineInstallPatchesParameters.class); - Assertions.assertEquals(Duration.parse("PT134H36S"), model.maximumDuration()); - Assertions.assertEquals(VMGuestPatchRebootSetting.NEVER, model.rebootSetting()); - Assertions.assertEquals(VMGuestPatchClassificationWindows.UPDATE_ROLL_UP, - model.windowsParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("qgxy", model.windowsParameters().kbNumbersToInclude().get(0)); - Assertions.assertEquals("cmbqfqvmk", model.windowsParameters().kbNumbersToExclude().get(0)); - Assertions.assertTrue(model.windowsParameters().excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-06T09:13:13Z"), - model.windowsParameters().maxPatchPublishDate()); - Assertions.assertEquals("jrjxgciqibrhosx", model.windowsParameters().patchNameMasksToInclude().get(0)); - Assertions.assertEquals("mhrkwofyyvoqacp", model.windowsParameters().patchNameMasksToExclude().get(0)); - Assertions.assertEquals(VMGuestPatchClassificationLinux.OTHER, - model.linuxParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("p", model.linuxParameters().packageNameMasksToInclude().get(0)); - Assertions.assertEquals("butauvfb", model.linuxParameters().packageNameMasksToExclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MachineInstallPatchesParameters model - = new MachineInstallPatchesParameters().withMaximumDuration(Duration.parse("PT134H36S")) - .withRebootSetting(VMGuestPatchRebootSetting.NEVER) - .withWindowsParameters(new WindowsParameters() - .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.UPDATE_ROLL_UP, - VMGuestPatchClassificationWindows.SECURITY, VMGuestPatchClassificationWindows.CRITICAL, - VMGuestPatchClassificationWindows.SERVICE_PACK)) - .withKbNumbersToInclude(Arrays.asList("qgxy")) - .withKbNumbersToExclude(Arrays.asList("cmbqfqvmk", "xozap", "helxprglya", "dd")) - .withExcludeKbsRequiringReboot(true) - .withMaxPatchPublishDate(OffsetDateTime.parse("2021-12-06T09:13:13Z")) - .withPatchNameMasksToInclude(Arrays.asList("jrjxgciqibrhosx", "dqrhzoymib", "rq", "ibahwflus")) - .withPatchNameMasksToExclude(Arrays.asList("mhrkwofyyvoqacp", "expbtg", "wbwo", "nwashrtd"))) - .withLinuxParameters(new LinuxParameters() - .withClassificationsToInclude( - Arrays.asList(VMGuestPatchClassificationLinux.OTHER, VMGuestPatchClassificationLinux.OTHER)) - .withPackageNameMasksToInclude(Arrays.asList("p", "kulpiujwaasi", "qiiobyuqer", "qlpqwcciuq")) - .withPackageNameMasksToExclude(Arrays.asList("butauvfb", "kuwhh", "hykojoxafnndlpic", "koymkcd"))); - model = BinaryData.fromObject(model).toObject(MachineInstallPatchesParameters.class); - Assertions.assertEquals(Duration.parse("PT134H36S"), model.maximumDuration()); - Assertions.assertEquals(VMGuestPatchRebootSetting.NEVER, model.rebootSetting()); - Assertions.assertEquals(VMGuestPatchClassificationWindows.UPDATE_ROLL_UP, - model.windowsParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("qgxy", model.windowsParameters().kbNumbersToInclude().get(0)); - Assertions.assertEquals("cmbqfqvmk", model.windowsParameters().kbNumbersToExclude().get(0)); - Assertions.assertTrue(model.windowsParameters().excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-06T09:13:13Z"), - model.windowsParameters().maxPatchPublishDate()); - Assertions.assertEquals("jrjxgciqibrhosx", model.windowsParameters().patchNameMasksToInclude().get(0)); - Assertions.assertEquals("mhrkwofyyvoqacp", model.windowsParameters().patchNameMasksToExclude().get(0)); - Assertions.assertEquals(VMGuestPatchClassificationLinux.OTHER, - model.linuxParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("p", model.linuxParameters().packageNameMasksToInclude().get(0)); - Assertions.assertEquals("butauvfb", model.linuxParameters().packageNameMasksToExclude().get(0)); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandScriptSourceTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandScriptSourceTests.java deleted file mode 100644 index da54313ff89d..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandScriptSourceTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandScriptSource; -import com.azure.resourcemanager.hybridcompute.models.RunCommandManagedIdentity; -import org.junit.jupiter.api.Assertions; - -public final class MachineRunCommandScriptSourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MachineRunCommandScriptSource model = BinaryData.fromString( - "{\"script\":\"maequiahxicslfa\",\"scriptUri\":\"z\",\"commandId\":\"yylhalnswhccsp\",\"scriptUriManagedIdentity\":{\"clientId\":\"ivwitqscywugg\",\"objectId\":\"luhczbw\"}}") - .toObject(MachineRunCommandScriptSource.class); - Assertions.assertEquals("maequiahxicslfa", model.script()); - Assertions.assertEquals("z", model.scriptUri()); - Assertions.assertEquals("yylhalnswhccsp", model.commandId()); - Assertions.assertEquals("ivwitqscywugg", model.scriptUriManagedIdentity().clientId()); - Assertions.assertEquals("luhczbw", model.scriptUriManagedIdentity().objectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MachineRunCommandScriptSource model = new MachineRunCommandScriptSource().withScript("maequiahxicslfa") - .withScriptUri("z") - .withCommandId("yylhalnswhccsp") - .withScriptUriManagedIdentity( - new RunCommandManagedIdentity().withClientId("ivwitqscywugg").withObjectId("luhczbw")); - model = BinaryData.fromObject(model).toObject(MachineRunCommandScriptSource.class); - Assertions.assertEquals("maequiahxicslfa", model.script()); - Assertions.assertEquals("z", model.scriptUri()); - Assertions.assertEquals("yylhalnswhccsp", model.commandId()); - Assertions.assertEquals("ivwitqscywugg", model.scriptUriManagedIdentity().clientId()); - Assertions.assertEquals("luhczbw", model.scriptUriManagedIdentity().objectId()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkInterfaceTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkInterfaceTests.java deleted file mode 100644 index c1d990f55b1d..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkInterfaceTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.NetworkInterface; -import org.junit.jupiter.api.Assertions; - -public final class NetworkInterfaceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkInterface model = BinaryData.fromString( - "{\"macAddress\":\"fqbuaceopzf\",\"id\":\"hhuao\",\"name\":\"pcqeqx\",\"ipAddresses\":[{\"address\":\"ahzxctobgbk\",\"ipAddressVersion\":\"oizpostmgrcfbun\",\"subnet\":{\"addressPrefix\":\"qjhhkxbpv\"}}]}") - .toObject(NetworkInterface.class); - Assertions.assertEquals("fqbuaceopzf", model.macAddress()); - Assertions.assertEquals("hhuao", model.id()); - Assertions.assertEquals("pcqeqx", model.name()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfileInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfileInnerTests.java deleted file mode 100644 index 845e5548e029..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfileInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner; - -public final class NetworkProfileInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkProfileInner model = BinaryData.fromString( - "{\"networkInterfaces\":[{\"macAddress\":\"prwmdyvxqt\",\"id\":\"riwwroy\",\"name\":\"exrmcqibycnojvk\",\"ipAddresses\":[{\"address\":\"qsgzvahapj\",\"ipAddressVersion\":\"hpvgqz\",\"subnet\":{\"addressPrefix\":\"vxdjzlmwlxkvugf\"}}]},{\"macAddress\":\"ovawjvzunlu\",\"id\":\"nnprn\",\"name\":\"peilpjzuaejxdu\",\"ipAddresses\":[{\"address\":\"zbbtdzumveek\",\"ipAddressVersion\":\"wozuhkf\",\"subnet\":{\"addressPrefix\":\"jyofdxluusdtto\"}},{\"address\":\"aboekqv\",\"ipAddressVersion\":\"lns\",\"subnet\":{\"addressPrefix\":\"xwyjsflhhc\"}}]},{\"macAddress\":\"lnjixisxya\",\"id\":\"oyaqcslyjpkiid\",\"name\":\"exznelixhnr\",\"ipAddresses\":[{\"address\":\"lhbnxkna\",\"ipAddressVersion\":\"ulppggdtpnapnyir\",\"subnet\":{\"addressPrefix\":\"hpigv\"}},{\"address\":\"ylgqgitxmedjvcsl\",\"ipAddressVersion\":\"qwwncw\",\"subnet\":{\"addressPrefix\":\"xgk\"}},{\"address\":\"mgucna\",\"ipAddressVersion\":\"t\",\"subnet\":{\"addressPrefix\":\"llwptfdy\"}}]}]}") - .toObject(NetworkProfileInner.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfilesGetWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfilesGetWithResponseMockTests.java index fd11502e53ae..16a89bc4f0e0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfilesGetWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkProfilesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -13,6 +13,7 @@ import com.azure.resourcemanager.hybridcompute.models.NetworkProfile; 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; @@ -20,7 +21,7 @@ public final class NetworkProfilesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"networkInterfaces\":[{\"macAddress\":\"xzcwxhmpejt\",\"id\":\"exaonwivkcq\",\"name\":\"xhxknlc\",\"ipAddresses\":[{\"address\":\"kyupijubyqj\",\"ipAddressVersion\":\"akfqfrkemyildud\",\"subnet\":{}},{\"address\":\"sco\",\"ipAddressVersion\":\"f\",\"subnet\":{}}]},{\"macAddress\":\"pdxphlkksnmgzvyf\",\"id\":\"dkz\",\"name\":\"nwsithuqolyahluq\",\"ipAddresses\":[{\"address\":\"sutrjbhxykfhyqe\",\"ipAddressVersion\":\"qqug\",\"subnet\":{}},{\"address\":\"tb\",\"ipAddressVersion\":\"exreu\",\"subnet\":{}},{\"address\":\"wtl\",\"ipAddressVersion\":\"fwhreagkhyxv\",\"subnet\":{}}]},{\"macAddress\":\"vbczsulmdg\",\"id\":\"mepjpf\",\"name\":\"ykgsangpszng\",\"ipAddresses\":[{\"address\":\"ylkvecjuj\",\"ipAddressVersion\":\"goadyedmzr\",\"subnet\":{}}]}]}"; + = "{\"networkInterfaces\":[{\"macAddress\":\"xrdcoxnbkkja\",\"id\":\"rnnqb\",\"name\":\"bpizxqltgr\",\"ipAddresses\":[{\"address\":\"pxrxvbfihwu\",\"ipAddressVersion\":\"ctafsrbxrblm\",\"subnet\":{}},{\"address\":\"wxihs\",\"ipAddressVersion\":\"xwqagnepzw\",\"subnet\":{}},{\"address\":\"sbs\",\"ipAddressVersion\":\"qqagwwr\",\"subnet\":{}},{\"address\":\"mz\",\"ipAddressVersion\":\"glrrczez\",\"subnet\":{}}]},{\"macAddress\":\"ltn\",\"id\":\"dhqoawj\",\"name\":\"yueayfbpcmsp\",\"ipAddresses\":[{\"address\":\"rueqthwm\",\"ipAddressVersion\":\"mbscbbx\",\"subnet\":{}},{\"address\":\"hxiidlopedb\",\"ipAddressVersion\":\"pyqy\",\"subnet\":{}}]},{\"macAddress\":\"ubmdnafcbqwre\",\"id\":\"ela\",\"name\":\"cigeleohdbvqvw\",\"ipAddresses\":[{\"address\":\"pwbeonr\",\"ipAddressVersion\":\"wzdqybxceakxcpts\",\"subnet\":{}},{\"address\":\"yiaseqchkrttzraz\",\"ipAddressVersion\":\"gyki\",\"subnet\":{}},{\"address\":\"vanbwzohmnrxxbs\",\"ipAddressVersion\":\"klinhmdptysprq\",\"subnet\":{}},{\"address\":\"zxojpslsv\",\"ipAddressVersion\":\"pli\",\"subnet\":{}}]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +31,14 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkProfile response = manager.networkProfiles() - .getWithResponse("naqln", "wiguyxlyk", com.azure.core.util.Context.NONE) + .getWithResponse("trczzydmxzjijp", "uaurkihcir", com.azure.core.util.Context.NONE) .getValue(); + Assertions.assertEquals("xrdcoxnbkkja", response.networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("rnnqb", response.networkInterfaces().get(0).id()); + Assertions.assertEquals("bpizxqltgr", response.networkInterfaces().get(0).name()); + Assertions.assertEquals("pxrxvbfihwu", response.networkInterfaces().get(0).ipAddresses().get(0).address()); + Assertions.assertEquals("ctafsrbxrblm", + response.networkInterfaces().get(0).ipAddresses().get(0).ipAddressVersion()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationInnerTests.java deleted file mode 100644 index 888c37d1c060..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkSecurityPerimeterConfigurationInner; - -public final class NetworkSecurityPerimeterConfigurationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"ibgjmfxumvfcl\",\"provisioningIssues\":[{\"name\":\"wxnb\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"cy\",\"suggestedResourceIds\":[\"dgirujbzbom\",\"zzbtdcqvpniyujvi\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"shfssnrbgyef\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"j\",\"suggestedResourceIds\":[\"nc\",\"tmr\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"ctymoxoftp\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"uh\",\"suggestedResourceIds\":[\"pqjlihhyusps\",\"asdvl\",\"fwdgzxulucvp\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"reuzvxurisjn\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"qjzgxmrhublw\",\"suggestedResourceIds\":[\"sutrgjup\",\"uutpwoqhih\",\"jqgwzp\",\"fqntcyp\"],\"suggestedAccessRules\":[{}]}}],\"networkSecurityPerimeter\":{\"id\":\"oimwkslirc\",\"perimeterGuid\":\"jxv\",\"location\":\"fceacvlhvygd\"},\"resourceAssociation\":{\"name\":\"umrtwnawjsl\",\"accessMode\":\"audit\"},\"profile\":{\"name\":\"jgcyztsfmznba\",\"accessRulesVersion\":419128665,\"accessRules\":[{\"name\":\"qnrnrpxehuwryk\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"viklb\",\"dvk\"]}},{\"name\":\"ejd\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"srhnjivo\",\"v\"]}},{\"name\":\"ovqfzge\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"ljltduceam\",\"mczuo\",\"ejwcwwqiok\",\"ssxmojms\"]}},{\"name\":\"kjprvk\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"jyxgtczh\",\"ydbsd\",\"hmkxmaehvbb\"]}}],\"diagnosticSettingsVersion\":1510704768,\"enabledLogCategories\":[\"ltfnhtbaxkgx\",\"wrck\",\"yklyhpluodpvruud\"]}},\"id\":\"zibt\",\"name\":\"ostgkts\",\"type\":\"vdxec\"}") - .toObject(NetworkSecurityPerimeterConfigurationInner.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationListResultTests.java deleted file mode 100644 index 7cf2ff00dc0c..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.NetworkSecurityPerimeterConfigurationListResult; -import org.junit.jupiter.api.Assertions; - -public final class NetworkSecurityPerimeterConfigurationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"wjplma\",\"provisioningIssues\":[{\"name\":\"yohpfkyrkdbdgiog\",\"properties\":{}},{\"name\":\"mnwqj\",\"properties\":{}},{\"name\":\"aiy\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"iacegfnmn\",\"perimeterGuid\":\"pmvmemfnczdwvv\",\"location\":\"lxlllchpo\"},\"resourceAssociation\":{\"name\":\"evwrdnhfuk\",\"accessMode\":\"learning\"},\"profile\":{\"name\":\"swsmys\",\"accessRulesVersion\":1139891496,\"accessRules\":[{},{}],\"diagnosticSettingsVersion\":1869521965,\"enabledLogCategories\":[\"vlerchpqbmfpjba\",\"widf\",\"xsspuunnoxyhk\",\"g\"]}},\"id\":\"drihpfhoqcaaewda\",\"name\":\"mdjvlpj\",\"type\":\"xkzb\"}],\"nextLink\":\"sgeivsiy\"}") - .toObject(NetworkSecurityPerimeterConfigurationListResult.class); - Assertions.assertEquals("sgeivsiy", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java deleted file mode 100644 index 584694eb918a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkSecurityPerimeterConfigurationProperties; - -public final class NetworkSecurityPerimeterConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"edqbc\",\"provisioningIssues\":[{\"name\":\"h\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"lwwqfbumlkxtrqj\",\"suggestedResourceIds\":[\"lmbtxhwgfwsrt\",\"wcoezbrhub\",\"kh\",\"dyg\"],\"suggestedAccessRules\":[{\"name\":\"kqfqjbvl\",\"properties\":{}},{\"name\":\"fmluiqtqzfavyvn\",\"properties\":{}},{\"name\":\"bar\",\"properties\":{}}]}}],\"networkSecurityPerimeter\":{\"id\":\"yjkqabqgzslesjcb\",\"perimeterGuid\":\"rnntiewdjcv\",\"location\":\"uwrbehwagoh\"},\"resourceAssociation\":{\"name\":\"fkmr\",\"accessMode\":\"enforced\"},\"profile\":{\"name\":\"hmxtdr\",\"accessRulesVersion\":1503248770,\"accessRules\":[{\"name\":\"oe\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"cjznmwcpmg\",\"aadraufactkahz\",\"v\",\"jjziuxxpsh\"]}},{\"name\":\"e\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"lqubkwdlen\",\"d\",\"utujba\"]}}],\"diagnosticSettingsVersion\":1391652347,\"enabledLogCategories\":[\"hminyflnorwmduv\"]}}") - .toObject(NetworkSecurityPerimeterConfigurationProperties.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationReconcileResultInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationReconcileResultInnerTests.java deleted file mode 100644 index d24a7e0667de..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationReconcileResultInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkSecurityPerimeterConfigurationReconcileResultInner; - -public final class NetworkSecurityPerimeterConfigurationReconcileResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationReconcileResultInner model - = BinaryData.fromString("{\"location\":\"kdncj\"}") - .toObject(NetworkSecurityPerimeterConfigurationReconcileResultInner.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeWithResponseMockTests.java index 61e1c83718b5..02e13e35fcdc 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -20,7 +20,7 @@ public final class NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeWi @Test public void testGetByPrivateLinkScopeWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"ssmzhhkuui\",\"provisioningIssues\":[{\"name\":\"qctekvalb\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"yvwehtaemxh\",\"suggestedResourceIds\":[\"se\"],\"suggestedAccessRules\":[{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"vzrrryveimi\",\"perimeterGuid\":\"kdyzatvfuzk\",\"location\":\"tjvv\"},\"resourceAssociation\":{\"name\":\"wigsyeipqdsm\",\"accessMode\":\"learning\"},\"profile\":{\"name\":\"gdgkki\",\"accessRulesVersion\":1543508000,\"accessRules\":[{\"name\":\"smk\",\"properties\":{}},{\"name\":\"tbbaedorvvmqf\",\"properties\":{}}],\"diagnosticSettingsVersion\":969781172,\"enabledLogCategories\":[\"gwumgxdgdhpa\",\"gdexjd\",\"vjsaqwotm\"]}},\"id\":\"llcolsrsxapte\",\"name\":\"hexcgjokj\",\"type\":\"jnhvlqjbekpeeks\"}"; + = "{\"properties\":{\"provisioningState\":\"xut\",\"provisioningIssues\":[{\"name\":\"r\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"lmbjwcolbmxlbnw\",\"suggestedResourceIds\":[\"pa\",\"pr\",\"rvxhmtfhocnxzcm\"],\"suggestedAccessRules\":[{},{}]}},{\"name\":\"xnoqrxtdisn\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"ydidwhepfwwtjf\",\"suggestedResourceIds\":[\"sxxh\",\"wcdbckyoik\",\"kxhnegknj\",\"rbhtmeplvukaobr\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"snbagnchjhg\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"ywalhjymxcg\",\"suggestedResourceIds\":[\"gdrclssolj\",\"mevtfycnlbvgjc\"],\"suggestedAccessRules\":[{}]}}],\"networkSecurityPerimeter\":{\"id\":\"ji\",\"perimeterGuid\":\"t\",\"location\":\"ikizbcu\"},\"resourceAssociation\":{\"name\":\"vntnrgmqso\",\"accessMode\":\"audit\"},\"profile\":{\"name\":\"xgnlykmx\",\"accessRulesVersion\":386903198,\"accessRules\":[{\"name\":\"doksqdtiwlwxlbon\",\"properties\":{}}],\"diagnosticSettingsVersion\":840670614,\"enabledLogCategories\":[\"icqchygtv\",\"byjanep\",\"bdpkxyqvgx\"]}},\"id\":\"aodetv\",\"name\":\"hkxdxuwsaifmc\",\"type\":\"nosbz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetByPrivateLinkScopeWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() - .getByPrivateLinkScopeWithResponse("zrsq", "lsxkd", "wqapfgsdp", com.azure.core.util.Context.NONE) + .getByPrivateLinkScopeWithResponse("ofkbtf", "hklbnldpvcbh", "ezyquw", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeMockTests.java index acbf8e874d58..60235dfbd40f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -21,7 +21,7 @@ public final class NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeM @Test public void testListByPrivateLinkScope() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"oqmavnwqjwgo\",\"provisioningIssues\":[{\"name\":\"jjjkxybwfdbk\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"vkzykjtjknsxf\",\"suggestedResourceIds\":[\"hcdpkupnqrmgj\",\"bpkuwxeoio\",\"fiz\",\"av\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"fbcyaykmm\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"rzx\",\"suggestedResourceIds\":[\"wsrsxkrplbja\",\"ejwwviyoyps\",\"hbrnnhjx\",\"qwjhqkbiwetpozyc\"],\"suggestedAccessRules\":[{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"hgf\",\"perimeterGuid\":\"tzlexbs\",\"location\":\"e\"},\"resourceAssociation\":{\"name\":\"ojpziuwfb\",\"accessMode\":\"learning\"},\"profile\":{\"name\":\"nhqs\",\"accessRulesVersion\":1382657592,\"accessRules\":[{\"name\":\"lpkpbafvafhl\",\"properties\":{}},{\"name\":\"ccbevxrhyzdf\",\"properties\":{}},{\"name\":\"ofpltdbm\",\"properties\":{}}],\"diagnosticSettingsVersion\":1921705459,\"enabledLogCategories\":[\"hfnrac\"]}},\"id\":\"pqigtuujwouhd\",\"name\":\"wsigrbjbxsj\",\"type\":\"bvitvqkjya\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"els\",\"provisioningIssues\":[{\"name\":\"zevxoqein\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"lzoblqwaafr\",\"suggestedResourceIds\":[\"hmzyqbhdvafjrqpj\"],\"suggestedAccessRules\":[{}]}}],\"networkSecurityPerimeter\":{\"id\":\"crgaxwmzwdf\",\"perimeterGuid\":\"nrzorpd\",\"location\":\"bqc\"},\"resourceAssociation\":{\"name\":\"fg\",\"accessMode\":\"learning\"},\"profile\":{\"name\":\"tgzdgv\",\"accessRulesVersion\":330072728,\"accessRules\":[{\"name\":\"qqil\",\"properties\":{}},{\"name\":\"d\",\"properties\":{}},{\"name\":\"oedxngucaifpaurw\",\"properties\":{}}],\"diagnosticSettingsVersion\":72382976,\"enabledLogCategories\":[\"qqa\",\"dmkxwxdcvjwcy\",\"iakeciqc\"]}},\"id\":\"xrtuicds\",\"name\":\"wdfmmpzhzzwvywr\",\"type\":\"yngydgrpxncaki\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testListByPrivateLinkScope() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkSecurityPerimeterConfigurations() - .listByPrivateLinkScope("bksdqhjvyklxesl", "hhus", com.azure.core.util.Context.NONE); + .listByPrivateLinkScope("ehgcvkbcknjo", "gjyy", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeMockTests.java index 30a6eb611a45..ccb417ab6cf4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -13,13 +13,14 @@ import com.azure.resourcemanager.hybridcompute.models.NetworkSecurityPerimeterConfigurationReconcileResult; 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 NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeMockTests { @Test public void testReconcileForPrivateLinkScope() throws Exception { - String responseStr = "{\"location\":\"oakizvoai\"}"; + String responseStr = "{\"location\":\"xhqf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -29,7 +30,8 @@ public void testReconcileForPrivateLinkScope() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSecurityPerimeterConfigurationReconcileResult response = manager.networkSecurityPerimeterConfigurations() - .reconcileForPrivateLinkScope("nu", "tggmuwdchozfnkfe", "lv", com.azure.core.util.Context.NONE); + .reconcileForPrivateLinkScope("aondjrkclamgg", "vlmfej", "oqeykglt", com.azure.core.util.Context.NONE); + Assertions.assertEquals("xhqf", response.location()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterProfileTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterProfileTests.java deleted file mode 100644 index f73caeb77c88..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterProfileTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.NetworkSecurityPerimeterProfile; - -public final class NetworkSecurityPerimeterProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeterProfile model = BinaryData.fromString( - "{\"name\":\"dyhgkfminsg\",\"accessRulesVersion\":1272513184,\"accessRules\":[{\"name\":\"sttktlahbqa\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"ukxit\",\"m\",\"tg\",\"qqxhrnxrxcpj\"]}},{\"name\":\"savokqdzf\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"l\",\"rqttbajlkatnw\"]}},{\"name\":\"iopid\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"vscx\",\"dmligovibrxk\",\"mloazuru\",\"cbgoor\"]}},{\"name\":\"eoybfhjxakvvjgs\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"mywwtkgkxnyed\",\"b\",\"yvudtjuewbci\",\"xuuwhcj\"]}}],\"diagnosticSettingsVersion\":1562574982,\"enabledLogCategories\":[\"bvpa\",\"akkud\"]}") - .toObject(NetworkSecurityPerimeterProfile.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterTests.java deleted file mode 100644 index 76e558b33a1a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/NetworkSecurityPerimeterTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.NetworkSecurityPerimeter; - -public final class NetworkSecurityPerimeterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkSecurityPerimeter model - = BinaryData.fromString("{\"id\":\"msksbp\",\"perimeterGuid\":\"lqol\",\"location\":\"kcgxxlxsffgcvi\"}") - .toObject(NetworkSecurityPerimeter.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationListResultTests.java deleted file mode 100644 index d5c09e4808ae..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationListResultTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"origin\":\"zyde\",\"name\":\"jwyahuxinpmqnja\",\"display\":{\"operation\":\"xj\",\"resource\":\"r\",\"description\":\"vcputegj\",\"provider\":\"mfdatscmdvpj\"},\"isDataAction\":true},{\"origin\":\"uuvmkjozkrwfnd\",\"name\":\"djpslw\",\"display\":{\"operation\":\"pvwryoqpsoacc\",\"resource\":\"zakljlahbc\",\"description\":\"ffdfdosygexpa\",\"provider\":\"akhmsbzjhcrz\"},\"isDataAction\":true}],\"nextLink\":\"hlxaolthqtr\"}") - .toObject(OperationListResult.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationValueDisplayTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationValueDisplayTests.java deleted file mode 100644 index 78a836966c66..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationValueDisplayTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.OperationValueDisplay; - -public final class OperationValueDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationValueDisplay model = BinaryData.fromString( - "{\"operation\":\"epoo\",\"resource\":\"nuvamiheogna\",\"description\":\"zxtheotusivyevcc\",\"provider\":\"ihnhun\"}") - .toObject(OperationValueDisplay.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationValueInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationValueInnerTests.java deleted file mode 100644 index d28cd8088570..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationValueInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.OperationValueInner; - -public final class OperationValueInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationValueInner model = BinaryData.fromString( - "{\"origin\":\"jbp\",\"name\":\"fsinzgvfcjrwzoxx\",\"display\":{\"operation\":\"elluwfziton\",\"resource\":\"qfpjk\",\"description\":\"xofpdvhpfxxypi\",\"provider\":\"nmayhuybb\"},\"isDataAction\":true}") - .toObject(OperationValueInner.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationsListMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationsListMockTests.java index 794b94055ca7..002c3b417c09 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationsListMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OperationsListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"origin\":\"oq\",\"name\":\"dvruzslzojhpctf\",\"display\":{\"operation\":\"xotngfdguge\",\"resource\":\"i\",\"description\":\"rkyui\",\"provider\":\"bsnmfpph\"},\"isDataAction\":false}]}"; + = "{\"value\":[{\"origin\":\"omacluzvxnqmhr\",\"name\":\"pd\",\"display\":{\"operation\":\"kois\",\"resource\":\"ssffxuifmc\",\"description\":\"p\",\"provider\":\"kdqzrdzsylo\"},\"isDataAction\":true}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionDataModelTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionDataModelTests.java deleted file mode 100644 index 9ccef4fb97d4..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionDataModelTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionDataModel; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionDataModelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionDataModel model = BinaryData.fromString( - "{\"id\":\"lcqcuubgqibrt\",\"name\":\"metttwgd\",\"type\":\"qxihhrmooi\",\"properties\":{\"privateEndpoint\":{\"id\":\"ypxiutcxap\"},\"privateLinkServiceConnectionState\":{\"status\":\"y\",\"description\":\"petogebjox\",\"actionsRequired\":\"hvnh\"},\"provisioningState\":\"brqnkkzjcjb\",\"groupIds\":[\"aehvvibrxjjstoq\",\"eitpkxztmo\",\"bklftidgfcwqmpim\",\"qxzhem\"]}}") - .toObject(PrivateEndpointConnectionDataModel.class); - Assertions.assertEquals("ypxiutcxap", model.properties().privateEndpoint().id()); - Assertions.assertEquals("y", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("petogebjox", model.properties().privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 0a7ad85aa597..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionInnerTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointProperty; -import com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnectionStateProperty; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"ahqkg\"},\"privateLinkServiceConnectionState\":{\"status\":\"pwijnhy\",\"description\":\"svfycxzbfv\",\"actionsRequired\":\"wvrvmtg\"},\"provisioningState\":\"ppyostronzmyhgf\",\"groupIds\":[\"sxkm\",\"waekrrjreafxtsgu\",\"hjglikk\",\"wslolbqp\"]},\"id\":\"zlmvfelfktgp\",\"name\":\"crpw\",\"type\":\"xeznoi\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("ahqkg", model.properties().privateEndpoint().id()); - Assertions.assertEquals("pwijnhy", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("svfycxzbfv", model.properties().privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner().withProperties( - new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpointProperty().withId("ahqkg")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty().withStatus("pwijnhy") - .withDescription("svfycxzbfv"))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("ahqkg", model.properties().privateEndpoint().id()); - Assertions.assertEquals("pwijnhy", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("svfycxzbfv", model.properties().privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index f1058825305b..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionListResultTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.PrivateEndpointConnectionListResult; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"mmji\"},\"privateLinkServiceConnectionState\":{\"status\":\"eozphv\",\"description\":\"auyqncygupkv\",\"actionsRequired\":\"mdscwxqupev\"},\"provisioningState\":\"f\",\"groupIds\":[\"txhojujb\",\"pelmcuvhixbjxyf\",\"n\"]},\"id\":\"r\",\"name\":\"ool\",\"type\":\"ttpkiwkkbnujrywv\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"fpncurdo\"},\"privateLinkServiceConnectionState\":{\"status\":\"iithtywu\",\"description\":\"xcbihw\",\"actionsRequired\":\"nfdn\"},\"provisioningState\":\"jchrdgoihxumw\",\"groupIds\":[\"ndz\"]},\"id\":\"uu\",\"name\":\"fdlwg\",\"type\":\"ytsbwtovv\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"inqfiufxqknpirgn\"},\"privateLinkServiceConnectionState\":{\"status\":\"ttwqmsni\",\"description\":\"fcdmqnrojlpijn\",\"actionsRequired\":\"xfrdd\"},\"provisioningState\":\"ratiz\",\"groupIds\":[\"nasx\",\"ft\",\"zq\"]},\"id\":\"hftwesgog\",\"name\":\"zhonnxkrlgnyhmo\",\"type\":\"sxkkg\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"gh\"},\"privateLinkServiceConnectionState\":{\"status\":\"bdhqxvcxgf\",\"description\":\"pdso\",\"actionsRequired\":\"shrnsvbuswdvz\"},\"provisioningState\":\"bycnunvjsrtkf\",\"groupIds\":[\"opqgikyzirtxdyux\",\"ejnt\",\"sewgioilqukr\",\"dxtqmieoxo\"]},\"id\":\"gufhyaomtbg\",\"name\":\"havgrvk\",\"type\":\"fo\"}],\"nextLink\":\"zh\"}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals("mmji", model.value().get(0).properties().privateEndpoint().id()); - Assertions.assertEquals("eozphv", - model.value().get(0).properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("auyqncygupkv", - model.value().get(0).properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("zh", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 5bbce7415195..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointProperty; -import com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnectionStateProperty; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"privateEndpoint\":{\"id\":\"njwmwkpnbsazejj\"},\"privateLinkServiceConnectionState\":{\"status\":\"kagfhsxtt\",\"description\":\"ugzxnf\",\"actionsRequired\":\"zpxdt\"},\"provisioningState\":\"dm\",\"groupIds\":[\"jlwuenvrkp\"]}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("njwmwkpnbsazejj", model.privateEndpoint().id()); - Assertions.assertEquals("kagfhsxtt", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ugzxnf", model.privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpointProperty().withId("njwmwkpnbsazejj")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty().withStatus("kagfhsxtt").withDescription("ugzxnf")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("njwmwkpnbsazejj", model.privateEndpoint().id()); - Assertions.assertEquals("kagfhsxtt", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ugzxnf", model.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java index a748eb3438fa..db1b6fbbbcfa 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -24,7 +24,7 @@ public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"watmqa\"},\"privateLinkServiceConnectionState\":{\"status\":\"ueatgroe\",\"description\":\"hoygzcbyfq\",\"actionsRequired\":\"faoytehqpuv\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"jdjusk\",\"rreqynkceysfaqe\",\"pl\",\"ryshwddkvbxgk\"]},\"id\":\"sybwptdaca\",\"name\":\"vvlfntymtp\",\"type\":\"iwenazero\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"mjzkxiidiscz\"},\"privateLinkServiceConnectionState\":{\"status\":\"oswoqiqazugamx\",\"description\":\"krrcoiisbamnpp\",\"actionsRequired\":\"ekuztdsbe\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"peti\",\"rx\",\"iubxdukec\"]},\"id\":\"dazvdhctm\",\"name\":\"koszu\",\"type\":\"blnsntrpcaqk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,17 +34,18 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .define("uusioycblev") - .withExistingPrivateLinkScope("rxmrgchbapx", "iyfjjkbajbuscg") + .define("ih") + .withExistingPrivateLinkScope("mo", "zkltrfowtdvrfmv") .withProperties(new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpointProperty().withId("ujyxkyxlzgsj")) + .withPrivateEndpoint(new PrivateEndpointProperty().withId("rqcrjidhftukvh")) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty().withStatus("zzlt") - .withDescription("fhbzffovwmbjlzq"))) + new PrivateLinkServiceConnectionStateProperty().withStatus("lwyojbfqzdkfnj") + .withDescription("ixh"))) .create(); - Assertions.assertEquals("watmqa", response.properties().privateEndpoint().id()); - Assertions.assertEquals("ueatgroe", response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("hoygzcbyfq", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("mjzkxiidiscz", response.properties().privateEndpoint().id()); + Assertions.assertEquals("oswoqiqazugamx", response.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("krrcoiisbamnpp", + response.properties().privateLinkServiceConnectionState().description()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsDeleteMockTests.java index 6185321e5e3e..1df918249aa7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsDeleteMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -27,8 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.privateEndpointConnections() - .delete("gpbemeluclvdjju", "yrdnqod", "ahhxhqfaqnvzoqg", com.azure.core.util.Context.NONE); + manager.privateEndpointConnections().delete("ieqvds", "a", "lixqcah", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index 2cb65a71da6a..b22fb82420ba 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -21,7 +21,7 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"cacoyvivbsiz\"},\"privateLinkServiceConnectionState\":{\"status\":\"jszlb\",\"description\":\"cmnlzijiufehg\",\"actionsRequired\":\"flnwy\"},\"provisioningState\":\"kxrerlniylylyfwx\",\"groupIds\":[\"gqztwhghmupgx\",\"jtcdxabbujftaben\",\"bklqpxz\"]},\"id\":\"afeddwwnlza\",\"name\":\"wxudgn\",\"type\":\"gookrtalvnb\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"ouambewre\"},\"privateLinkServiceConnectionState\":{\"status\":\"moweg\",\"description\":\"mut\",\"actionsRequired\":\"xeyg\"},\"provisioningState\":\"igijiitnspxlz\",\"groupIds\":[\"ygr\",\"jwaiuf\"]},\"id\":\"raybfueqfr\",\"name\":\"jsydgrhydkygywez\",\"type\":\"kiecafygzm\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("zv", "qxfx", "elgcmpzqjhhhqx", com.azure.core.util.Context.NONE) + .getWithResponse("wbqerzwxiytxtd", "ukvlb", "ktg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cacoyvivbsiz", response.properties().privateEndpoint().id()); - Assertions.assertEquals("jszlb", response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("cmnlzijiufehg", - response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ouambewre", response.properties().privateEndpoint().id()); + Assertions.assertEquals("moweg", response.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("mut", response.properties().privateLinkServiceConnectionState().description()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsListByPrivateLinkScopeMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsListByPrivateLinkScopeMockTests.java index 41f92ae048e9..06c7971c281b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsListByPrivateLinkScopeMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointConnectionsListByPrivateLinkScopeMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -22,7 +22,7 @@ public final class PrivateEndpointConnectionsListByPrivateLinkScopeMockTests { @Test public void testListByPrivateLinkScope() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"homewjjstliu\"},\"privateLinkServiceConnectionState\":{\"status\":\"awmo\",\"description\":\"ia\",\"actionsRequired\":\"znvodrrslblxydk\"},\"provisioningState\":\"xvv\",\"groupIds\":[\"wkgfbqljnqkh\",\"chocokulehur\",\"lrqff\"]},\"id\":\"eyu\",\"name\":\"kphyjdxrav\",\"type\":\"uqd\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"wjdjodqhykin\"},\"privateLinkServiceConnectionState\":{\"status\":\"rem\",\"description\":\"hllizhceumoq\",\"actionsRequired\":\"kadppyibngq\"},\"provisioningState\":\"d\",\"groupIds\":[\"xwhydtluvv\",\"ds\",\"zsn\"]},\"id\":\"emlowuowhl\",\"name\":\"lnwy\",\"type\":\"mouvbl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,12 +32,12 @@ public void testListByPrivateLinkScope() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.privateEndpointConnections() - .listByPrivateLinkScope("ipemchgavscz", "ejdtxptl", com.azure.core.util.Context.NONE); + .listByPrivateLinkScope("hxalybxawo", "jpodtbl", com.azure.core.util.Context.NONE); - Assertions.assertEquals("homewjjstliu", response.iterator().next().properties().privateEndpoint().id()); - Assertions.assertEquals("awmo", + Assertions.assertEquals("wjdjodqhykin", response.iterator().next().properties().privateEndpoint().id()); + Assertions.assertEquals("rem", response.iterator().next().properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ia", + Assertions.assertEquals("hllizhceumoq", response.iterator().next().properties().privateLinkServiceConnectionState().description()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointPropertyTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointPropertyTests.java deleted file mode 100644 index 7c058543c24b..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateEndpointPropertyTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointProperty; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointProperty model - = BinaryData.fromString("{\"id\":\"uaibrebqaaysj\"}").toObject(PrivateEndpointProperty.class); - Assertions.assertEquals("uaibrebqaaysj", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointProperty model = new PrivateEndpointProperty().withId("uaibrebqaaysj"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointProperty.class); - Assertions.assertEquals("uaibrebqaaysj", model.id()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourceInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index 855f5cd006a3..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkResourceInner; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"zfjvfbgofe\",\"requiredMembers\":[\"grqmqhldvrii\"],\"requiredZoneNames\":[\"nalghfkvtvsexso\",\"ueluqhhahhxvrhmz\"]},\"id\":\"pjgwwspug\",\"name\":\"ftqsxhqxujxuk\",\"type\":\"dxdigr\"}") - .toObject(PrivateLinkResourceInner.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourceListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourceListResultTests.java deleted file mode 100644 index 4189d9467ea6..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourceListResultTests.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.implementation.models.PrivateLinkResourceListResult; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"wcvtbvkayhmtnvyq\",\"requiredMembers\":[\"kzwpcnpw\",\"cjaesgvvs\",\"cyajguqf\"],\"requiredZoneNames\":[\"gzlvdnkfxu\"]},\"id\":\"mdwzrmuhapfcqdps\",\"name\":\"xqv\",\"type\":\"svuo\"},{\"properties\":{\"groupId\":\"ccelve\",\"requiredMembers\":[\"pqlmfe\"],\"requiredZoneNames\":[\"rqwky\",\"kobopgxed\",\"owepbqpcrfkb\",\"ccsnjvcdwxlpq\"]},\"id\":\"ftnkhtj\",\"name\":\"y\",\"type\":\"ngwfqatm\"},{\"properties\":{\"groupId\":\"tmdvypgikdgs\",\"requiredMembers\":[\"kbir\"],\"requiredZoneNames\":[\"zh\",\"hkjoqr\",\"qqaatjinrvgou\"]},\"id\":\"fiibfggjioolvr\",\"name\":\"x\",\"type\":\"v\"},{\"properties\":{\"groupId\":\"gllqwjy\",\"requiredMembers\":[\"ayvblmhvkzuhbx\",\"vyhgs\",\"pbyrqufegxu\"],\"requiredZoneNames\":[\"fbn\"]},\"id\":\"mctlpdngitv\",\"name\":\"bmhrixkwmyijejv\",\"type\":\"grhbpn\"}],\"nextLink\":\"xexccbdreaxhcexd\"}") - .toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("xexccbdreaxhcexd", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index a492382ad66a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.PrivateLinkResourceProperties; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"uufzdmsyqtfihw\",\"requiredMembers\":[\"tzingamvpph\"],\"requiredZoneNames\":[\"qzudphq\",\"mvdk\"]}") - .toObject(PrivateLinkResourceProperties.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesGetWithResponseMockTests.java index f5f813d9ef55..a7607ef05759 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -20,7 +20,7 @@ public final class PrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"bmh\",\"requiredMembers\":[\"ijkgqxnhm\",\"keznjaujvaa\",\"nggiycwkdtaa\",\"xw\"],\"requiredZoneNames\":[\"aumrrqmbzmqkrat\"]},\"id\":\"xwbjs\",\"name\":\"dbirkfpksokdgo\",\"type\":\"ewijymrhbguz\"}"; + = "{\"properties\":{\"groupId\":\"yjgyd\",\"requiredMembers\":[\"odsaeuzan\"],\"requiredZoneNames\":[\"nhsenwphpzfng\",\"jclid\",\"tujwjju\"]},\"id\":\"beqrkuorh\",\"name\":\"ssruqnmdvhazcvj\",\"type\":\"tiq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkResource response = manager.privateLinkResources() - .getWithResponse("ad", "yqegx", "iv", com.azure.core.util.Context.NONE) + .getWithResponse("ktpv", "xqcsehch", "hufmpq", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesListByPrivateLinkScopeMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesListByPrivateLinkScopeMockTests.java index 97df52be2ae3..1b2c0d52c7c3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesListByPrivateLinkScopeMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkResourcesListByPrivateLinkScopeMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -21,7 +21,7 @@ public final class PrivateLinkResourcesListByPrivateLinkScopeMockTests { @Test public void testListByPrivateLinkScope() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"mffjkutycyarn\",\"requiredMembers\":[\"hguabzoghktdp\",\"czhcoeocnh\"],\"requiredZoneNames\":[\"ot\",\"jzcfyjzptwr\",\"ohapqinfsz\",\"yglqdhmrjzral\"]},\"id\":\"pjby\",\"name\":\"psjoqcjenk\",\"type\":\"hf\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"uykbbmn\",\"requiredMembers\":[\"ltbxoeeonqlnfw\",\"y\",\"mvqdbpbhfckdvez\"],\"requiredZoneNames\":[\"ssbzhddubbnqfbl\",\"kalehp\",\"vawu\"]},\"id\":\"qjtiogqgdm\",\"name\":\"nictteajo\",\"type\":\"iygspnbonhpczyk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testListByPrivateLinkScope() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.privateLinkResources() - .listByPrivateLinkScope("zkye", "nfnzhhh", com.azure.core.util.Context.NONE); + .listByPrivateLinkScope("vcuartrhun", "pirykycndzfqiv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopeValidationDetailsInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopeValidationDetailsInnerTests.java deleted file mode 100644 index 07e94edd3498..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopeValidationDetailsInnerTests.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkScopeValidationDetailsInner; -import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkScopeValidationDetailsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkScopeValidationDetailsInner model = BinaryData.fromString( - "{\"id\":\"onbzoggculapzwy\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"qxepnylbfuaj\",\"privateIpAddress\":\"jtlvofqzhvfciby\",\"linkIdentifier\":\"owuxrkjpvdwx\",\"groupId\":\"wiivwzjbhyzsx\",\"memberName\":\"kambtrnegvmnvuqe\"},{\"id\":\"lds\",\"privateIpAddress\":\"stjbkkdmfl\",\"linkIdentifier\":\"stmjlxrri\",\"groupId\":\"zapeewchpx\",\"memberName\":\"twkuziycs\"}]}") - .toObject(PrivateLinkScopeValidationDetailsInner.class); - Assertions.assertEquals(PublicNetworkAccessType.DISABLED, model.publicNetworkAccess()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateWithResponseMockTests.java index 98ff46fc3c14..c7ca4184bcf0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -9,16 +9,12 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; -import com.azure.core.util.BinaryData; import com.azure.resourcemanager.hybridcompute.HybridComputeManager; import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScope; import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScopeProperties; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtension; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtensionPublicNetworkAccess; 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; @@ -29,7 +25,7 @@ public final class PrivateLinkScopesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"bagn\",\"privateLinkScopeId\":\"jhgem\",\"privateEndpointConnections\":[{\"id\":\"ky\",\"name\":\"lhjym\",\"type\":\"gqtagd\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"soljome\",\"description\":\"tfy\"},\"provisioningState\":\"lbvgjc\",\"groupIds\":[\"kgjiiytssikizbc\"]}},{\"id\":\"q\",\"name\":\"ntnrgmqsorh\",\"type\":\"kxgnlykmxcpwzvmd\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"dt\",\"description\":\"wlwxlboncqbazqic\"},\"provisioningState\":\"hygtv\",\"groupIds\":[\"janepubdpkx\",\"qvgx\",\"aodetv\"]}},{\"id\":\"kxdxuwsaifmcwn\",\"name\":\"bzlehgc\",\"type\":\"bcknjolgj\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"velsz\",\"description\":\"rqz\"},\"provisioningState\":\"xoqeintxwalj\",\"groupIds\":[\"o\",\"lqwa\"]}},{\"id\":\"r\",\"name\":\"lhm\",\"type\":\"qb\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"fjrqpjiyr\",\"description\":\"jc\"},\"provisioningState\":\"a\",\"groupIds\":[\"z\",\"dfkbnrzorpdltbq\"]}}],\"serviceExtensions\":[{\"serviceExtensionType\":\"\\\"datafg\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"}]},\"location\":\"etgzdgvpy\",\"tags\":{\"ngucaifpaurww\":\"aqqilzdcduwjoed\",\"wxdcvjwcyz\":\"ilfjqqacdmk\",\"tuicds\":\"akeciqchx\"},\"id\":\"wdfmmpzhzzwvywr\",\"name\":\"yngydgrpxncaki\",\"type\":\"aondjrkclamgg\"}"; + = "{\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"gpxvkqmaupxvpi\",\"privateLinkScopeId\":\"f\",\"privateEndpointConnections\":[{\"id\":\"zyzeyuubeidsz\",\"name\":\"ytoithgygvfl\",\"type\":\"vdihoynkrx\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"kdrcyrucp\",\"description\":\"unnuzdqumoenodn\"},\"provisioningState\":\"enhqhskndnelq\",\"groupIds\":[\"dlknwfoanniyop\",\"txiv\",\"nrlyxnuc\"]}},{\"id\":\"p\",\"name\":\"lkwq\",\"type\":\"tv\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"tcjb\",\"description\":\"tvivuzqym\"},\"provisioningState\":\"owog\",\"groupIds\":[\"tsqhzvbrzcdban\"]}},{\"id\":\"ndscxmxeatk\",\"name\":\"mwnrdj\",\"type\":\"bqbnaomhjrmkuh\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"jalfihcjmobcanc\",\"description\":\"exxqcwg\"},\"provisioningState\":\"fgvaknokzwj\",\"groupIds\":[\"ltixldzyyfytpq\"]}}]},\"location\":\"x\",\"tags\":{\"vyqlkjuvsmbmslzo\":\"puj\"},\"id\":\"ovwzdbpqvybefg\",\"name\":\"mx\",\"type\":\"okcvtlubses\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -38,30 +34,20 @@ public void testCreateOrUpdateWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - HybridComputePrivateLinkScope response - = manager.privateLinkScopes() - .define("z") - .withRegion("lmydidwhep") - .withExistingResourceGroup("mwiuawvcm") - .withTags(mapOf("dbckyo", "tjfdoesxxhmw")) - .withProperties(new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED) - .withServiceExtensions(Arrays.asList( - new ServiceExtension() - .withServiceExtensionType( - BinaryData.fromBytes("\"dataxzcmjhngxno\"".getBytes(StandardCharsets.UTF_8))) - .withServiceExtensionPublicNetworkAccess(ServiceExtensionPublicNetworkAccess.DISABLED), - new ServiceExtension() - .withServiceExtensionType( - BinaryData.fromBytes("\"datadisnj\"".getBytes(StandardCharsets.UTF_8))) - .withServiceExtensionPublicNetworkAccess(ServiceExtensionPublicNetworkAccess.DISABLED)))) - .create(); + HybridComputePrivateLinkScope response = manager.privateLinkScopes() + .define("zmwntopagt") + .withRegion("fdsajred") + .withExistingResourceGroup("bdweade") + .withTags(mapOf("afpwzyifrkgwl", "yshtuwgmev", "zdyi", "xeqipx", "abnsmj", "sfayorpravkjoges", + "qpkevmyltjc", "wynqxaekqsykvwj")) + .withProperties( + new HybridComputePrivateLinkScopeProperties().withPublicNetworkAccess(PublicNetworkAccessType.ENABLED)) + .create(); - Assertions.assertEquals("etgzdgvpy", response.location()); - Assertions.assertEquals("aqqilzdcduwjoed", response.tags().get("ngucaifpaurww")); - Assertions.assertEquals(PublicNetworkAccessType.DISABLED, response.properties().publicNetworkAccess()); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.DISABLED, - response.properties().serviceExtensions().get(0).serviceExtensionPublicNetworkAccess()); + Assertions.assertEquals("x", response.location()); + Assertions.assertEquals("puj", response.tags().get("vyqlkjuvsmbmslzo")); + Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, + response.properties().publicNetworkAccess()); } // Use "Map.of" if available diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteMockTests.java index 3d8023771941..33ccdeca7ade 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.privateLinkScopes().delete("dqumoenodnai", "nhq", com.azure.core.util.Context.NONE); + manager.privateLinkScopes().delete("bevxrhyzd", "wrso", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetByResourceGroupWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetByResourceGroupWithResponseMockTests.java index 9327d31f4d2e..337c59e98c71 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetByResourceGroupWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -12,7 +12,6 @@ import com.azure.resourcemanager.hybridcompute.HybridComputeManager; import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScope; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtensionPublicNetworkAccess; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -23,7 +22,7 @@ public final class PrivateLinkScopesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"gttmvmmagoaqyl\",\"privateLinkScopeId\":\"ztj\",\"privateEndpointConnections\":[{\"id\":\"jcg\",\"name\":\"itpfinzcpdl\",\"type\":\"rlgjm\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"vcqguefzh\",\"description\":\"mpheqdur\"},\"provisioningState\":\"yujlfyoumpckyecl\",\"groupIds\":[\"gptaj\",\"rzmq\",\"ucycijo\",\"lxiutgjcyzyzjdnr\"]}},{\"id\":\"btxjeaoqaqbzg\",\"name\":\"fwwvuatbwbqam\",\"type\":\"uliyslpkcv\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"uxx\",\"description\":\"pmywbormcq\"},\"provisioningState\":\"ciijqpkzfbojxj\",\"groupIds\":[\"myqwixvcpwnkwywz\",\"ofalickduoiqtam\",\"yvsk\",\"xrwzawnvsbcf\"]}},{\"id\":\"agxnvhycvdimw\",\"name\":\"regzgyufutrwpwer\",\"type\":\"kzkdhmeott\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"osxw\",\"description\":\"hnhjtfvpndpmi\"},\"provisioningState\":\"pnwy\",\"groupIds\":[\"qllzsauzpjlxeehu\",\"iqhzlr\",\"yme\",\"xls\"]}},{\"id\":\"hmx\",\"name\":\"dsajrednwyysh\",\"type\":\"w\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"uafpwzyifrk\",\"description\":\"wltxeqipxgzdyims\"},\"provisioningState\":\"yorpr\",\"groupIds\":[\"jogeslabnsmjkwyn\"]}}],\"serviceExtensions\":[{\"serviceExtensionType\":\"\\\"datakqsykvwjtqpke\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"},{\"serviceExtensionType\":\"\\\"datatjcrspxklurccl\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Enabled\"},{\"serviceExtensionType\":\"\\\"datannnoytz\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"}]},\"location\":\"wxigpxv\",\"tags\":{\"dfaifyzyzeyuube\":\"aupxvpi\",\"l\":\"ds\"},\"id\":\"ytoithgygvfl\",\"name\":\"gvdihoynkrxwetwk\",\"type\":\"rcyrucpcunnu\"}"; + = "{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"qigtuujwouhdaws\",\"privateLinkScopeId\":\"rb\",\"privateEndpointConnections\":[{\"id\":\"jybvit\",\"name\":\"kjyaznumtg\",\"type\":\"uwdchozf\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"xlvxnoakiz\",\"description\":\"oaiknaqlnuwig\"},\"provisioningState\":\"xly\",\"groupIds\":[\"hvxzcwxhmp\",\"jtlkexaonwivkcqh\"]}},{\"id\":\"hxknlccrmmkyupi\",\"name\":\"byqjfkakfqfrkem\",\"type\":\"ldudxjascowv\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"pdxphlkksnmgzvyf\",\"description\":\"jd\"},\"provisioningState\":\"uqnwsithu\",\"groupIds\":[\"yahluqwqulsutr\"]}},{\"id\":\"hxykfhyqez\",\"name\":\"qugdrftbcvexreuq\",\"type\":\"wtl\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"hreagk\",\"description\":\"yxvrqtvbczsul\"},\"provisioningState\":\"gglmepjpfsey\",\"groupIds\":[\"angpszngafpgyl\"]}}]},\"location\":\"ecjujcng\",\"tags\":{\"oknub\":\"yedmzrgj\",\"coqra\":\"oitpkpztrgdgx\",\"qi\":\"wugyx\"},\"id\":\"we\",\"name\":\"alwvskbu\",\"type\":\"z\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +32,11 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); HybridComputePrivateLinkScope response = manager.privateLinkScopes() - .getByResourceGroupWithResponse("ndsbdw", "aderzmw", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("pl", "dbmairrhvhfnr", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wxigpxv", response.location()); - Assertions.assertEquals("aupxvpi", response.tags().get("dfaifyzyzeyuube")); + Assertions.assertEquals("ecjujcng", response.location()); + Assertions.assertEquals("yedmzrgj", response.tags().get("oknub")); Assertions.assertEquals(PublicNetworkAccessType.ENABLED, response.properties().publicNetworkAccess()); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.DISABLED, - response.properties().serviceExtensions().get(0).serviceExtensionPublicNetworkAccess()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsForMachineWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsForMachineWithResponseMockTests.java index 9e83c7e51847..16279c89ee12 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsForMachineWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsForMachineWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -22,7 +22,7 @@ public final class PrivateLinkScopesGetValidationDetailsForMachineWithResponseMo @Test public void testGetValidationDetailsForMachineWithResponse() throws Exception { String responseStr - = "{\"id\":\"gdgxvcoqraswug\",\"publicNetworkAccess\":\"Enabled\",\"connectionDetails\":[{\"id\":\"we\",\"privateIpAddress\":\"l\",\"linkIdentifier\":\"skbuhzaca\",\"groupId\":\"yltcoqcuj\",\"memberName\":\"sxzakuejkm\"},{\"id\":\"iztjof\",\"privateIpAddress\":\"vovjufycsjmlbe\",\"linkIdentifier\":\"ej\",\"groupId\":\"iuxegth\",\"memberName\":\"tudaw\"},{\"id\":\"jfel\",\"privateIpAddress\":\"rpptcbgqnzmnhiil\",\"linkIdentifier\":\"lwcjgckbbcccgzpr\",\"groupId\":\"xnyuffatsgftipwc\",\"memberName\":\"yubhiqdx\"},{\"id\":\"rnpnuhzafccnuh\",\"privateIpAddress\":\"gbylbuig\",\"linkIdentifier\":\"vatvcrkd\",\"groupId\":\"nbqxvhcsyhzlwxae\",\"memberName\":\"vurex\"}]}"; + = "{\"id\":\"iilialwc\",\"publicNetworkAccess\":\"Enabled\",\"connectionDetails\":[{\"id\":\"cccg\",\"privateIpAddress\":\"raoxnyuff\",\"linkIdentifier\":\"sgftipwc\",\"groupId\":\"yubhiqdx\",\"memberName\":\"rnpnuhzafccnuh\"},{\"id\":\"gbylbuig\",\"privateIpAddress\":\"vatvcrkd\",\"linkIdentifier\":\"nbqxvhcsyhzlwxae\",\"groupId\":\"vurex\",\"memberName\":\"d\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,7 +32,7 @@ public void testGetValidationDetailsForMachineWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkScopeValidationDetails response = manager.privateLinkScopes() - .getValidationDetailsForMachineWithResponse("foknubnoitp", "pz", com.azure.core.util.Context.NONE) + .getValidationDetailsForMachineWithResponse("pjfe", "qerpptcbgqnzm", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PublicNetworkAccessType.ENABLED, response.publicNetworkAccess()); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsWithResponseMockTests.java index 5e50ee3a0bb4..2e7b8c56e45e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -22,7 +22,7 @@ public final class PrivateLinkScopesGetValidationDetailsWithResponseMockTests { @Test public void testGetValidationDetailsWithResponse() throws Exception { String responseStr - = "{\"id\":\"njyixh\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"xmbjroum\",\"privateIpAddress\":\"n\",\"linkIdentifier\":\"l\",\"groupId\":\"rhuzgfxonjtpu\",\"memberName\":\"l\"},{\"id\":\"pvti\",\"privateIpAddress\":\"zbpdbo\",\"linkIdentifier\":\"gryfqiuasig\",\"groupId\":\"wsocnequygdjbo\",\"memberName\":\"rmtqjkqevadr\"}]}"; + = "{\"id\":\"pdsxzakuejkm\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"ofqcvovjufycsjm\",\"privateIpAddress\":\"e\",\"linkIdentifier\":\"ej\",\"groupId\":\"iuxegth\",\"memberName\":\"tudaw\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,7 +32,7 @@ public void testGetValidationDetailsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkScopeValidationDetails response = manager.privateLinkScopes() - .getValidationDetailsWithResponse("ojbf", "zd", com.azure.core.util.Context.NONE) + .getValidationDetailsWithResponse("caqt", "ltcoqc", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(PublicNetworkAccessType.DISABLED, response.publicNetworkAccess()); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListByResourceGroupMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListByResourceGroupMockTests.java index 9fe31ae5930a..1ba0203fbb08 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListByResourceGroupMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListByResourceGroupMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -13,7 +13,6 @@ import com.azure.resourcemanager.hybridcompute.HybridComputeManager; import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScope; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtensionPublicNetworkAccess; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -24,7 +23,7 @@ public final class PrivateLinkScopesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"iyop\",\"privateLinkScopeId\":\"xivcnrlyxnu\",\"privateEndpointConnections\":[{\"id\":\"hblkwqpatvbq\",\"name\":\"tcjb\",\"type\":\"vivuzqymtuowo\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"tsqhzvbrzcdban\",\"description\":\"zndscxmxeatkdbmw\"},\"provisioningState\":\"djyibqbnaomhjrm\",\"groupIds\":[\"maxljalfihcj\",\"obcancdexxqcw\",\"a\"]}},{\"id\":\"gvaknokzwjjzrl\",\"name\":\"xldzyyfytpqsix\",\"type\":\"m\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"vyqlkjuvsmbmslzo\",\"description\":\"ovwzdbpqvybefg\"},\"provisioningState\":\"x\",\"groupIds\":[\"cvtlubseskvc\",\"artr\"]}},{\"id\":\"nlp\",\"name\":\"ykycndzfqi\",\"type\":\"reuykbbmnwagl\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"eeonqlnfwm\",\"description\":\"ymvqdbpbhfckdvez\"},\"provisioningState\":\"cssbzhddu\",\"groupIds\":[\"qfblhkalehpa\",\"awugiqjti\",\"gqgdminictteajoh\",\"ygspnbonhpczykm\"]}},{\"id\":\"p\",\"name\":\"xqcsehch\",\"type\":\"ufmpqumqyjgy\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"odsaeuzan\",\"description\":\"sfnhsenwphp\"},\"provisioningState\":\"ngqjclidf\",\"groupIds\":[\"wjjufwbe\"]}}],\"serviceExtensions\":[{\"serviceExtensionType\":\"\\\"dataorhtss\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"}]},\"location\":\"mdvhazcvjy\",\"tags\":{\"txtd\":\"swbqerzwxi\",\"ktg\":\"ukvlb\",\"bewreswmowegmmut\":\"styoua\"},\"id\":\"yxey\",\"name\":\"uqi\",\"type\":\"ijiitns\"}]}"; + = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"rqgdgkkil\",\"privateLinkScopeId\":\"lkcsmknhwtbbae\",\"privateEndpointConnections\":[{\"id\":\"vmq\",\"name\":\"oygbdgwumgxd\",\"type\":\"hpabgdexjddvjs\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"tm\",\"description\":\"wllcolsr\"},\"provisioningState\":\"apte\",\"groupIds\":[\"xcgjokjljnhvlq\",\"bekpeeksnbksdqhj\",\"yklxe\",\"lkhhu\"]}},{\"id\":\"cpoq\",\"name\":\"vnwqjwgo\",\"type\":\"lejjjkxy\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"bkjbz\",\"description\":\"ensvkzykjtj\"},\"provisioningState\":\"sxfwushcdp\",\"groupIds\":[\"nq\"]}},{\"id\":\"gjfbpkuwxeoi\",\"name\":\"fiz\",\"type\":\"vkjzwfbcyaykm\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"bfw\",\"description\":\"rzx\"},\"provisioningState\":\"ewsrsxkrplbjaze\",\"groupIds\":[\"viyoypsuhbrnnhjx\"]}}]},\"location\":\"wjh\",\"tags\":{\"c\":\"iwetpoz\",\"ledynojpz\":\"qiqyhgfsetzlexbs\"},\"id\":\"uwfbzkkdtnhqsy\",\"name\":\"ljselp\",\"type\":\"pbafvafhlbylc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,13 +33,11 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.privateLinkScopes().listByResourceGroup("skndnelqkaadlknw", com.azure.core.util.Context.NONE); + = manager.privateLinkScopes().listByResourceGroup("syeipqd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("mdvhazcvjy", response.iterator().next().location()); - Assertions.assertEquals("swbqerzwxi", response.iterator().next().tags().get("txtd")); - Assertions.assertEquals(PublicNetworkAccessType.DISABLED, + Assertions.assertEquals("wjh", response.iterator().next().location()); + Assertions.assertEquals("iwetpoz", response.iterator().next().tags().get("c")); + Assertions.assertEquals(PublicNetworkAccessType.ENABLED, response.iterator().next().properties().publicNetworkAccess()); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.DISABLED, - response.iterator().next().properties().serviceExtensions().get(0).serviceExtensionPublicNetworkAccess()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListMockTests.java index 7bd7a7105f97..c03f8539cc6c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesListMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -13,7 +13,6 @@ import com.azure.resourcemanager.hybridcompute.HybridComputeManager; import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScope; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtensionPublicNetworkAccess; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; @@ -24,7 +23,7 @@ public final class PrivateLinkScopesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"es\",\"privateLinkScopeId\":\"rijwai\",\"privateEndpointConnections\":[{\"id\":\"raybfueqfr\",\"name\":\"sydgrhydk\",\"type\":\"ywezskiecafyg\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"eqvdsm\",\"description\":\"klixqcahyhxaly\"},\"provisioningState\":\"awoijp\",\"groupIds\":[\"blxpkkwjdjodq\",\"ykincnremehl\",\"izhceumoqodkadp\",\"yibngqladywrxwh\"]}}],\"serviceExtensions\":[{\"serviceExtensionType\":\"\\\"datauvvadswzsnu\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Disabled\"}]},\"location\":\"owuowh\",\"tags\":{\"lgmokzkl\":\"nwyrmouv\"},\"id\":\"rfowtdvrfmvlih\",\"name\":\"vjdrqcrjidhftuk\",\"type\":\"hdxlw\"}]}"; + = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"ytehqpuvjmvqmt\",\"privateLinkScopeId\":\"ckygroejnndljdju\",\"privateEndpointConnections\":[{\"id\":\"req\",\"name\":\"kceysfaqegplw\",\"type\":\"shwddkvbxgk\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"bwptdacarvvlf\",\"description\":\"tymtpoiwenazer\"},\"provisioningState\":\"zrsq\",\"groupIds\":[\"xkdnwqapf\",\"sdpcvess\",\"zhhkuuipldqqc\",\"ekvalblhtjq\"]}}]},\"location\":\"yvwehtaemxh\",\"tags\":{\"usxivzrrryvei\":\"se\"},\"id\":\"ipsk\",\"name\":\"yzatvfuzkaft\",\"type\":\"vvruxwi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -36,11 +35,9 @@ public void testList() throws Exception { PagedIterable response = manager.privateLinkScopes().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("owuowh", response.iterator().next().location()); - Assertions.assertEquals("nwyrmouv", response.iterator().next().tags().get("lgmokzkl")); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, + Assertions.assertEquals("yvwehtaemxh", response.iterator().next().location()); + Assertions.assertEquals("se", response.iterator().next().tags().get("usxivzrrryvei")); + Assertions.assertEquals(PublicNetworkAccessType.DISABLED, response.iterator().next().properties().publicNetworkAccess()); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.DISABLED, - response.iterator().next().properties().serviceExtensions().get(0).serviceExtensionPublicNetworkAccess()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkServiceConnectionStatePropertyTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkServiceConnectionStatePropertyTests.java deleted file mode 100644 index bdbc590f14c6..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkServiceConnectionStatePropertyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnectionStateProperty; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStatePropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionStateProperty model = BinaryData - .fromString("{\"status\":\"ixqtn\",\"description\":\"ttezlw\",\"actionsRequired\":\"fiakpjpqqm\"}") - .toObject(PrivateLinkServiceConnectionStateProperty.class); - Assertions.assertEquals("ixqtn", model.status()); - Assertions.assertEquals("ttezlw", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionStateProperty model - = new PrivateLinkServiceConnectionStateProperty().withStatus("ixqtn").withDescription("ttezlw"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionStateProperty.class); - Assertions.assertEquals("ixqtn", model.status()); - Assertions.assertEquals("ttezlw", model.description()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProcessorTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProcessorTests.java deleted file mode 100644 index e1ffffccb61a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProcessorTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.Processor; - -public final class ProcessorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Processor model - = BinaryData.fromString("{\"name\":\"epdkzja\",\"numberOfCores\":350095412}").toObject(Processor.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductFeatureUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductFeatureUpdateTests.java deleted file mode 100644 index d349d79e40e4..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductFeatureUpdateTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; -import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; -import org.junit.jupiter.api.Assertions; - -public final class ProductFeatureUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProductFeatureUpdate model - = BinaryData.fromString("{\"name\":\"jwosytxitcskfck\",\"subscriptionStatus\":\"Disable\"}") - .toObject(ProductFeatureUpdate.class); - Assertions.assertEquals("jwosytxitcskfck", model.name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProductFeatureUpdate model = new ProductFeatureUpdate().withName("jwosytxitcskfck") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE); - model = BinaryData.fromObject(model).toObject(ProductFeatureUpdate.class); - Assertions.assertEquals("jwosytxitcskfck", model.name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductProfileUpdatePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductProfileUpdatePropertiesTests.java deleted file mode 100644 index 5e2dbb8454b9..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductProfileUpdatePropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.ProductProfileUpdateProperties; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; -import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ProductProfileUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProductProfileUpdateProperties model = BinaryData.fromString( - "{\"subscriptionStatus\":\"Disable\",\"productType\":\"WindowsServer\",\"productFeatures\":[{\"name\":\"l\",\"subscriptionStatus\":\"Disable\"},{\"name\":\"xagl\",\"subscriptionStatus\":\"Enable\"}]}") - .toObject(ProductProfileUpdateProperties.class); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); - Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); - Assertions.assertEquals("l", model.productFeatures().get(0).name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, - model.productFeatures().get(0).subscriptionStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProductProfileUpdateProperties model = new ProductProfileUpdateProperties() - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE) - .withProductType(LicenseProfileProductType.WINDOWS_SERVER) - .withProductFeatures(Arrays.asList( - new ProductFeatureUpdate().withName("l") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE), - new ProductFeatureUpdate().withName("xagl") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE))); - model = BinaryData.fromObject(model).toObject(ProductProfileUpdateProperties.class); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); - Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); - Assertions.assertEquals("l", model.productFeatures().get(0).name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, - model.productFeatures().get(0).subscriptionStatus()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProvisioningIssuePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProvisioningIssuePropertiesTests.java deleted file mode 100644 index 5fa5862b945f..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProvisioningIssuePropertiesTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.ProvisioningIssueProperties; - -public final class ProvisioningIssuePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProvisioningIssueProperties model = BinaryData.fromString( - "{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"ywjhhgdnhx\",\"suggestedResourceIds\":[\"v\",\"omi\",\"ox\"],\"suggestedAccessRules\":[{\"name\":\"fi\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"zaofjchvcyy\",\"s\",\"gdotcubiipuipwo\",\"onmacjekniz\"]}},{\"name\":\"qvci\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"mblrrilbywd\",\"smiccwrwfscj\"]}}]}") - .toObject(ProvisioningIssueProperties.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProvisioningIssueTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProvisioningIssueTests.java deleted file mode 100644 index f6091201a99a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProvisioningIssueTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ProvisioningIssue; - -public final class ProvisioningIssueTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProvisioningIssue model = BinaryData.fromString( - "{\"name\":\"klvxwmyg\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"hiszepnnbjcrxgib\",\"suggestedResourceIds\":[\"xconfozauors\",\"kokwbqplhlvnu\",\"epzl\"],\"suggestedAccessRules\":[{\"name\":\"zsoldwey\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"mnnrwr\",\"i\"]}}]}}") - .toObject(ProvisioningIssue.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceAssociationTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceAssociationTests.java deleted file mode 100644 index 6ff2780ea719..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceAssociationTests.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ResourceAssociation; - -public final class ResourceAssociationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceAssociation model = BinaryData.fromString("{\"name\":\"zdwlvwlyoupfgfb\",\"accessMode\":\"enforced\"}") - .toObject(ResourceAssociation.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProvidersUpgradeExtensionsMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProvidersUpgradeExtensionsMockTests.java index 7cf7dd7c319d..5c1cea192f7f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProvidersUpgradeExtensionsMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProvidersUpgradeExtensionsMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -32,12 +32,10 @@ public void testUpgradeExtensions() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.resourceProviders() - .upgradeExtensions("zlrpiqywncvj", "szcofizeht", - new MachineExtensionUpgrade().withExtensionTargets( - mapOf("eljeamurvzmlovua", new ExtensionTargetProperties().withTargetVersion("jkv"), "lvidizozs", - new ExtensionTargetProperties().withTargetVersion("shcxlpmjerbdk"), "nfdgn", - new ExtensionTargetProperties().withTargetVersion("ccxjm"), "uqj", - new ExtensionTargetProperties().withTargetVersion("cypuuwwlt"))), + .upgradeExtensions("ytswfp", "mdgycxn", + new MachineExtensionUpgrade() + .withExtensionTargets(mapOf("urlpshh", new ExtensionTargetProperties().withTargetVersion("hqjjys"), + "rhmpqvwwsk", new ExtensionTargetProperties().withTargetVersion("pedwqsl"))), com.azure.core.util.Context.NONE); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceUpdateTests.java deleted file mode 100644 index 0290bc8f2c05..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceUpdateTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ResourceUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceUpdate model = BinaryData.fromString( - "{\"tags\":{\"ppbhtqqrolfp\":\"mbe\",\"gjyjgzjaoyfhrtxi\":\"psalgbqux\",\"rkujy\":\"n\",\"rlyxwjkcprbnw\":\"vlejuvfqa\"}}") - .toObject(ResourceUpdate.class); - Assertions.assertEquals("mbe", model.tags().get("ppbhtqqrolfp")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceUpdate model = new ResourceUpdate().withTags( - mapOf("ppbhtqqrolfp", "mbe", "gjyjgzjaoyfhrtxi", "psalgbqux", "rkujy", "n", "rlyxwjkcprbnw", "vlejuvfqa")); - model = BinaryData.fromObject(model).toObject(ResourceUpdate.class); - Assertions.assertEquals("mbe", model.tags().get("ppbhtqqrolfp")); - } - - // 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/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandInputParameterTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandInputParameterTests.java deleted file mode 100644 index 528cc03db40a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandInputParameterTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.RunCommandInputParameter; -import org.junit.jupiter.api.Assertions; - -public final class RunCommandInputParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RunCommandInputParameter model = BinaryData.fromString("{\"name\":\"xqhuexm\",\"value\":\"ttlstvlzywemhz\"}") - .toObject(RunCommandInputParameter.class); - Assertions.assertEquals("xqhuexm", model.name()); - Assertions.assertEquals("ttlstvlzywemhz", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RunCommandInputParameter model = new RunCommandInputParameter().withName("xqhuexm").withValue("ttlstvlzywemhz"); - model = BinaryData.fromObject(model).toObject(RunCommandInputParameter.class); - Assertions.assertEquals("xqhuexm", model.name()); - Assertions.assertEquals("ttlstvlzywemhz", model.value()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandManagedIdentityTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandManagedIdentityTests.java deleted file mode 100644 index 69cb811cfca0..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandManagedIdentityTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.RunCommandManagedIdentity; -import org.junit.jupiter.api.Assertions; - -public final class RunCommandManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RunCommandManagedIdentity model - = BinaryData.fromString("{\"clientId\":\"hairsbrgzdwms\",\"objectId\":\"ypqwdxggiccc\"}") - .toObject(RunCommandManagedIdentity.class); - Assertions.assertEquals("hairsbrgzdwms", model.clientId()); - Assertions.assertEquals("ypqwdxggiccc", model.objectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RunCommandManagedIdentity model - = new RunCommandManagedIdentity().withClientId("hairsbrgzdwms").withObjectId("ypqwdxggiccc"); - model = BinaryData.fromObject(model).toObject(RunCommandManagedIdentity.class); - Assertions.assertEquals("hairsbrgzdwms", model.clientId()); - Assertions.assertEquals("ypqwdxggiccc", model.objectId()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ServiceExtensionTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ServiceExtensionTests.java deleted file mode 100644 index 63e05da7fe69..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ServiceExtensionTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtension; -import com.azure.resourcemanager.hybridcompute.models.ServiceExtensionPublicNetworkAccess; -import java.nio.charset.StandardCharsets; -import org.junit.jupiter.api.Assertions; - -public final class ServiceExtensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceExtension model = BinaryData - .fromString( - "{\"serviceExtensionType\":\"\\\"datah\\\"\",\"serviceExtensionPublicNetworkAccess\":\"Enabled\"}") - .toObject(ServiceExtension.class); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.ENABLED, - model.serviceExtensionPublicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceExtension model = new ServiceExtension() - .withServiceExtensionType(BinaryData.fromBytes("\"datah\"".getBytes(StandardCharsets.UTF_8))) - .withServiceExtensionPublicNetworkAccess(ServiceExtensionPublicNetworkAccess.ENABLED); - model = BinaryData.fromObject(model).toObject(ServiceExtension.class); - Assertions.assertEquals(ServiceExtensionPublicNetworkAccess.ENABLED, - model.serviceExtensionPublicNetworkAccess()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ServiceStatusTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ServiceStatusTests.java deleted file mode 100644 index 1b1d49ea07b4..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ServiceStatusTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ServiceStatus; -import org.junit.jupiter.api.Assertions; - -public final class ServiceStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceStatus model = BinaryData.fromString("{\"status\":\"haaxdbabphl\",\"startupType\":\"qlfktsths\"}") - .toObject(ServiceStatus.class); - Assertions.assertEquals("haaxdbabphl", model.status()); - Assertions.assertEquals("qlfktsths", model.startupType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceStatus model = new ServiceStatus().withStatus("haaxdbabphl").withStartupType("qlfktsths"); - model = BinaryData.fromObject(model).toObject(ServiceStatus.class); - Assertions.assertEquals("haaxdbabphl", model.status()); - Assertions.assertEquals("qlfktsths", model.startupType()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ServiceStatusesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ServiceStatusesTests.java deleted file mode 100644 index a53023a0addc..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ServiceStatusesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ServiceStatus; -import com.azure.resourcemanager.hybridcompute.models.ServiceStatuses; -import org.junit.jupiter.api.Assertions; - -public final class ServiceStatusesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceStatuses model = BinaryData.fromString( - "{\"extensionService\":{\"status\":\"nmpxttdb\",\"startupType\":\"bnlankxmyskpb\"},\"guestConfigurationService\":{\"status\":\"btkcxywnytnrsyn\",\"startupType\":\"idybyxczf\"}}") - .toObject(ServiceStatuses.class); - Assertions.assertEquals("nmpxttdb", model.extensionService().status()); - Assertions.assertEquals("bnlankxmyskpb", model.extensionService().startupType()); - Assertions.assertEquals("btkcxywnytnrsyn", model.guestConfigurationService().status()); - Assertions.assertEquals("idybyxczf", model.guestConfigurationService().startupType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceStatuses model = new ServiceStatuses() - .withExtensionService(new ServiceStatus().withStatus("nmpxttdb").withStartupType("bnlankxmyskpb")) - .withGuestConfigurationService( - new ServiceStatus().withStatus("btkcxywnytnrsyn").withStartupType("idybyxczf")); - model = BinaryData.fromObject(model).toObject(ServiceStatuses.class); - Assertions.assertEquals("nmpxttdb", model.extensionService().status()); - Assertions.assertEquals("bnlankxmyskpb", model.extensionService().startupType()); - Assertions.assertEquals("btkcxywnytnrsyn", model.guestConfigurationService().status()); - Assertions.assertEquals("idybyxczf", model.guestConfigurationService().startupType()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsGatewayPropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsGatewayPropertiesTests.java deleted file mode 100644 index ab22c92f181b..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsGatewayPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsGatewayProperties; -import org.junit.jupiter.api.Assertions; - -public final class SettingsGatewayPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SettingsGatewayProperties model = BinaryData.fromString("{\"gatewayResourceId\":\"qtibxyijddtv\"}") - .toObject(SettingsGatewayProperties.class); - Assertions.assertEquals("qtibxyijddtv", model.gatewayResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SettingsGatewayProperties model = new SettingsGatewayProperties().withGatewayResourceId("qtibxyijddtv"); - model = BinaryData.fromObject(model).toObject(SettingsGatewayProperties.class); - Assertions.assertEquals("qtibxyijddtv", model.gatewayResourceId()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsInnerTests.java deleted file mode 100644 index 006bca71829a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; -import org.junit.jupiter.api.Assertions; - -public final class SettingsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SettingsInner model = BinaryData.fromString( - "{\"properties\":{\"tenantId\":\"lhjlmuoyxprimr\",\"gatewayProperties\":{\"gatewayResourceId\":\"teecjmeislst\"}},\"id\":\"sylwxdzaumweooh\",\"name\":\"uufuz\",\"type\":\"oyjathwtzol\"}") - .toObject(SettingsInner.class); - Assertions.assertEquals("teecjmeislst", model.gatewayResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SettingsInner model = new SettingsInner().withGatewayResourceId("teecjmeislst"); - model = BinaryData.fromObject(model).toObject(SettingsInner.class); - Assertions.assertEquals("teecjmeislst", model.gatewayResourceId()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsGetWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsGetWithResponseMockTests.java index 8b57043c3620..89caf185d760 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsGetWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsGetWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -21,7 +21,7 @@ public final class SettingsOperationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"tenantId\":\"wkpphefsb\",\"gatewayProperties\":{\"gatewayResourceId\":\"bzxomeik\"}},\"id\":\"lwzacn\",\"name\":\"wpfsuqtaaz\",\"type\":\"qbxyxoyfpuqqi\"}"; + = "{\"properties\":{\"tenantId\":\"ukyrdnqodxahh\",\"gatewayProperties\":{\"gatewayResourceId\":\"faqnvz\"}},\"id\":\"gyipem\",\"name\":\"hgav\",\"type\":\"czuejdtxptl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,10 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Settings response = manager.settingsOperations() - .getWithResponse("jczjnciuiyqv", "daswvpp", "sqqzlgcndhz", "rr", "cfsrhkhgsn", + .getWithResponse("zucafeddww", "lzafwxu", "gnhgook", "talvnbwgp", "emeluclv", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("bzxomeik", response.gatewayResourceId()); + Assertions.assertEquals("faqnvz", response.gatewayResourceId()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsPatchWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsPatchWithResponseMockTests.java index ce94445ca491..7f90f13a1dc5 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsPatchWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsPatchWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -22,7 +22,7 @@ public final class SettingsOperationsPatchWithResponseMockTests { @Test public void testPatchWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"tenantId\":\"aueekcsueh\",\"gatewayProperties\":{\"gatewayResourceId\":\"dac\"}},\"id\":\"bgydlqidywm\",\"name\":\"mptyrilkfbnrqqxv\",\"type\":\"tpbnfnqtxjtoma\"}"; + = "{\"properties\":{\"tenantId\":\"ispkxkdtx\",\"gatewayProperties\":{\"gatewayResourceId\":\"dlqvtwknvg\"}},\"id\":\"bugtywatmqa\",\"name\":\"kueatgroeshoy\",\"type\":\"zcbyfq\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testPatchWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Settings response = manager.settingsOperations() - .patchWithResponse("nqqlmgnl", "xsjxtelexhvuqboz", "o", "zqocarku", "lbcnndt", - new SettingsInner().withGatewayResourceId("zexnxakcky"), com.azure.core.util.Context.NONE) + .patchWithResponse("vpmclujyxkyxlz", "sjgkzzltafh", "zffovwmbjl", "qsczpgvdwnapfdqw", "wf", + new SettingsInner().withGatewayResourceId("tkschgcgqyhl"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dac", response.gatewayResourceId()); + Assertions.assertEquals("dlqvtwknvg", response.gatewayResourceId()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsUpdateWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsUpdateWithResponseMockTests.java index bb2a77912c37..f4f8d9f42c78 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsUpdateWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsUpdateWithResponseMockTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. +// Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.hybridcompute.generated; @@ -22,7 +22,7 @@ public final class SettingsOperationsUpdateWithResponseMockTests { @Test public void testUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"tenantId\":\"xkxbhxvu\",\"gatewayProperties\":{\"gatewayResourceId\":\"lgmnhjevdyzn\"}},\"id\":\"jsvkskmqozzkivy\",\"name\":\"jrliiz\",\"type\":\"ixlqfhefkwabsolr\"}"; + = "{\"properties\":{\"tenantId\":\"xmrgchbapxkiy\",\"gatewayProperties\":{\"gatewayResourceId\":\"kbajbu\"}},\"id\":\"gd\",\"name\":\"u\",\"type\":\"ioycbl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,10 @@ public void testUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Settings response = manager.settingsOperations() - .updateWithResponse("ezxlhdjzqdca", "wvpsoz", "iihjriybmrzo", "pnx", "dvwnjkgvfnmxa", - new SettingsInner().withGatewayResourceId("btyi"), com.azure.core.util.Context.NONE) + .updateWithResponse("h", "zhomewjjstliu", "qawmoaianc", "nvodrrs", "blxydkxr", + new SettingsInner().withGatewayResourceId("ychocokulehu"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("lgmnhjevdyzn", response.gatewayResourceId()); + Assertions.assertEquals("kbajbu", response.gatewayResourceId()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsPropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsPropertiesTests.java deleted file mode 100644 index 1b58d0790dc5..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsProperties; -import org.junit.jupiter.api.Assertions; - -public final class SettingsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SettingsProperties model = BinaryData - .fromString( - "{\"tenantId\":\"emwmdxmebwjs\",\"gatewayProperties\":{\"gatewayResourceId\":\"ahlxveabfqxnm\"}}") - .toObject(SettingsProperties.class); - Assertions.assertEquals("ahlxveabfqxnm", model.gatewayResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SettingsProperties model = new SettingsProperties().withGatewayResourceId("ahlxveabfqxnm"); - model = BinaryData.fromObject(model).toObject(SettingsProperties.class); - Assertions.assertEquals("ahlxveabfqxnm", model.gatewayResourceId()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/StorageProfileTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/StorageProfileTests.java deleted file mode 100644 index 9727d07d91bc..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/StorageProfileTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.StorageProfile; - -public final class StorageProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageProfile model = BinaryData.fromString( - "{\"disks\":[{\"path\":\"d\",\"diskType\":\"avxbniwdjswztsdb\",\"generatedId\":\"nxytxh\",\"id\":\"xbzpfzab\",\"name\":\"cuh\",\"maxSizeInBytes\":4597813945642072862,\"usedSpaceInBytes\":6687289446631946821},{\"path\":\"klbb\",\"diskType\":\"plwzbhvgyugu\",\"generatedId\":\"vmkfssxqu\",\"id\":\"fpl\",\"name\":\"gsxnkjzkdeslpv\",\"maxSizeInBytes\":6216827827800062431,\"usedSpaceInBytes\":7152845958063232892},{\"path\":\"hxpkd\",\"diskType\":\"baiuebbaumny\",\"generatedId\":\"ped\",\"id\":\"jn\",\"name\":\"ckhsmtxpsieb\",\"maxSizeInBytes\":4922743900723589322,\"usedSpaceInBytes\":3953779484897603289}]}") - .toObject(StorageProfile.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SubnetTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SubnetTests.java deleted file mode 100644 index 46a7c5d4792c..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SubnetTests.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.Subnet; -import org.junit.jupiter.api.Assertions; - -public final class SubnetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Subnet model = BinaryData.fromString("{\"addressPrefix\":\"vkr\"}").toObject(Subnet.class); - Assertions.assertEquals("vkr", model.addressPrefix()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/TagsResourceTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/TagsResourceTests.java deleted file mode 100644 index f2bce3419d19..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/TagsResourceTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.TagsResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TagsResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TagsResource model = BinaryData.fromString( - "{\"tags\":{\"zwculkbawpfajnj\":\"wtwko\",\"vkcdmxzr\":\"ltlwtjjguktalhs\",\"aaomylweazu\":\"oaimlnw\"}}") - .toObject(TagsResource.class); - Assertions.assertEquals("wtwko", model.tags().get("zwculkbawpfajnj")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TagsResource model = new TagsResource() - .withTags(mapOf("zwculkbawpfajnj", "wtwko", "vkcdmxzr", "ltlwtjjguktalhs", "aaomylweazu", "oaimlnw")); - model = BinaryData.fromObject(model).toObject(TagsResource.class); - Assertions.assertEquals("wtwko", model.tags().get("zwculkbawpfajnj")); - } - - // 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/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/VolumeLicenseDetailsTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/VolumeLicenseDetailsTests.java deleted file mode 100644 index a0a4437cd2c3..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/VolumeLicenseDetailsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.ProgramYear; -import com.azure.resourcemanager.hybridcompute.models.VolumeLicenseDetails; -import org.junit.jupiter.api.Assertions; - -public final class VolumeLicenseDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeLicenseDetails model = BinaryData.fromString("{\"programYear\":\"Year 3\",\"invoiceId\":\"qytbciq\"}") - .toObject(VolumeLicenseDetails.class); - Assertions.assertEquals(ProgramYear.YEAR_3, model.programYear()); - Assertions.assertEquals("qytbciq", model.invoiceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeLicenseDetails model - = new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("qytbciq"); - model = BinaryData.fromObject(model).toObject(VolumeLicenseDetails.class); - Assertions.assertEquals(ProgramYear.YEAR_3, model.programYear()); - Assertions.assertEquals("qytbciq", model.invoiceId()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/WindowsParametersTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/WindowsParametersTests.java deleted file mode 100644 index b7b356680eea..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/WindowsParametersTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationWindows; -import com.azure.resourcemanager.hybridcompute.models.WindowsParameters; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WindowsParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WindowsParameters model = BinaryData.fromString( - "{\"classificationsToInclude\":[\"UpdateRollUp\",\"Tools\",\"Security\"],\"kbNumbersToInclude\":[\"dreqnovvqf\",\"vljxywsu\",\"syrsndsytgadgvra\",\"aeneqnzarrwl\"],\"kbNumbersToExclude\":[\"ijfqkacewiipfp\",\"bjibwwiftohq\"],\"excludeKbsRequiringReboot\":false,\"maxPatchPublishDate\":\"2021-11-18T05:21:14Z\",\"patchNameMasksToInclude\":[\"gplsaknynf\",\"ynl\"],\"patchNameMasksToExclude\":[\"uopxodlqiyntor\",\"ihleos\",\"swsrms\",\"yzrpzbchckqqzq\"]}") - .toObject(WindowsParameters.class); - Assertions.assertEquals(VMGuestPatchClassificationWindows.UPDATE_ROLL_UP, - model.classificationsToInclude().get(0)); - Assertions.assertEquals("dreqnovvqf", model.kbNumbersToInclude().get(0)); - Assertions.assertEquals("ijfqkacewiipfp", model.kbNumbersToExclude().get(0)); - Assertions.assertFalse(model.excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T05:21:14Z"), model.maxPatchPublishDate()); - Assertions.assertEquals("gplsaknynf", model.patchNameMasksToInclude().get(0)); - Assertions.assertEquals("uopxodlqiyntor", model.patchNameMasksToExclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WindowsParameters model = new WindowsParameters() - .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.UPDATE_ROLL_UP, - VMGuestPatchClassificationWindows.TOOLS, VMGuestPatchClassificationWindows.SECURITY)) - .withKbNumbersToInclude(Arrays.asList("dreqnovvqf", "vljxywsu", "syrsndsytgadgvra", "aeneqnzarrwl")) - .withKbNumbersToExclude(Arrays.asList("ijfqkacewiipfp", "bjibwwiftohq")) - .withExcludeKbsRequiringReboot(false) - .withMaxPatchPublishDate(OffsetDateTime.parse("2021-11-18T05:21:14Z")) - .withPatchNameMasksToInclude(Arrays.asList("gplsaknynf", "ynl")) - .withPatchNameMasksToExclude(Arrays.asList("uopxodlqiyntor", "ihleos", "swsrms", "yzrpzbchckqqzq")); - model = BinaryData.fromObject(model).toObject(WindowsParameters.class); - Assertions.assertEquals(VMGuestPatchClassificationWindows.UPDATE_ROLL_UP, - model.classificationsToInclude().get(0)); - Assertions.assertEquals("dreqnovvqf", model.kbNumbersToInclude().get(0)); - Assertions.assertEquals("ijfqkacewiipfp", model.kbNumbersToExclude().get(0)); - Assertions.assertFalse(model.excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-18T05:21:14Z"), model.maxPatchPublishDate()); - Assertions.assertEquals("gplsaknynf", model.patchNameMasksToInclude().get(0)); - Assertions.assertEquals("uopxodlqiyntor", model.patchNameMasksToExclude().get(0)); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/tsp-location.yaml b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/tsp-location.yaml deleted file mode 100644 index c55c0822613a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/tsp-location.yaml +++ /dev/null @@ -1,4 +0,0 @@ -directory: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/HybridCompute -commit: e64d37d1c60bdfc5dce4673808c09a50a12d1fd5 -repo: Azure/azure-rest-api-specs -additionalDirectories: