From 4c42252bc00924e9a11dbbec61f9dd1db624648d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 14 Nov 2024 00:43:57 -0800 Subject: [PATCH] [Automation] Generate Fluent Lite from Swagger hybridcompute#package-preview-2024-07 (#42939) --- .../CHANGELOG.md | 93 +- .../README.md | 4 +- .../SAMPLE.md | 526 ++++++-- .../pom.xml | 4 +- .../hybridcompute/HybridComputeManager.java | 54 +- .../hybridcompute/fluent/GatewaysClient.java | 237 ++++ .../fluent/HybridComputeManagementClient.java | 21 + .../fluent/MachineExtensionsClient.java | 8 +- .../fluent/MachineRunCommandsClient.java | 201 +++ .../fluent/SettingsOperationsClient.java | 125 ++ .../fluent/models/GatewayInner.java | 256 ++++ .../fluent/models/GatewayProperties.java | 174 +++ .../models/GatewayUpdateProperties.java | 96 ++ .../fluent/models/MachineInner.java | 30 + .../fluent/models/MachinePropertiesInner.java | 60 + .../fluent/models/MachineRunCommandInner.java | 484 +++++++ .../models/MachineRunCommandProperties.java | 479 +++++++ .../models/SettingsGatewayProperties.java | 93 ++ .../fluent/models/SettingsInner.java | 186 +++ .../fluent/models/SettingsProperties.java | 124 ++ .../implementation/GatewayImpl.java | 211 +++ .../implementation/GatewaysClientImpl.java | 1172 +++++++++++++++++ .../implementation/GatewaysImpl.java | 146 ++ .../HybridComputeManagementClientImpl.java | 50 +- .../MachineExtensionsClientImpl.java | 20 +- .../implementation/MachineImpl.java | 15 + .../implementation/MachinePropertiesImpl.java | 15 + .../implementation/MachineRunCommandImpl.java | 281 ++++ .../MachineRunCommandsClientImpl.java | 948 +++++++++++++ .../MachineRunCommandsImpl.java | 158 +++ .../implementation/SettingsImpl.java | 53 + .../SettingsOperationsClientImpl.java | 623 +++++++++ .../SettingsOperationsImpl.java | 110 ++ .../hybridcompute/models/AgentUpgrade.java | 12 +- .../hybridcompute/models/Disk.java | 261 ++++ .../hybridcompute/models/ExecutionState.java | 76 ++ .../models/ExtensionsResourceStatus.java | 211 +++ .../models/ExtensionsStatusLevelTypes.java | 61 + .../hybridcompute/models/FirmwareProfile.java | 97 ++ .../hybridcompute/models/Gateway.java | 310 +++++ .../hybridcompute/models/GatewayType.java | 46 + .../hybridcompute/models/GatewayUpdate.java | 124 ++ .../hybridcompute/models/Gateways.java | 157 +++ .../models/GatewaysListResult.java | 136 ++ .../hybridcompute/models/HardwareProfile.java | 118 ++ .../hybridcompute/models/Machine.java | 21 + .../models/MachineProperties.java | 21 + .../models/MachineRunCommand.java | 690 ++++++++++ .../models/MachineRunCommandInstanceView.java | 305 +++++ .../models/MachineRunCommandScriptSource.java | 198 +++ .../models/MachineRunCommandUpdate.java | 79 ++ .../models/MachineRunCommands.java | 145 ++ .../models/MachineRunCommandsListResult.java | 130 ++ .../models/NetworkInterface.java | 86 +- .../hybridcompute/models/Processor.java | 97 ++ .../models/RunCommandInputParameter.java | 133 ++ .../models/RunCommandManagedIdentity.java | 131 ++ .../hybridcompute/models/Settings.java | 62 + .../models/SettingsOperations.java | 117 ++ .../hybridcompute/models/StorageProfile.java | 98 ++ .../proxy-config.json | 2 +- .../ExtensionMetadataGetSamples.java | 4 +- .../ExtensionMetadataListSamples.java | 4 +- .../GatewaysCreateOrUpdateSamples.java | 33 + .../generated/GatewaysDeleteSamples.java | 24 + .../GatewaysGetByResourceGroupSamples.java | 25 + .../GatewaysListByResourceGroupSamples.java | 25 + .../generated/GatewaysListSamples.java | 25 + .../generated/GatewaysUpdateSamples.java | 30 + .../LicenseProfilesCreateOrUpdateSamples.java | 4 +- .../LicenseProfilesDeleteSamples.java | 4 +- .../generated/LicenseProfilesGetSamples.java | 4 +- .../generated/LicenseProfilesListSamples.java | 4 +- .../LicenseProfilesUpdateSamples.java | 4 +- .../LicensesCreateOrUpdateSamples.java | 2 +- .../generated/LicensesDeleteSamples.java | 2 +- .../LicensesGetByResourceGroupSamples.java | 2 +- .../LicensesListByResourceGroupSamples.java | 2 +- .../generated/LicensesListSamples.java | 2 +- .../generated/LicensesUpdateSamples.java | 2 +- .../LicensesValidateLicenseSamples.java | 2 +- ...achineExtensionsCreateOrUpdateSamples.java | 4 +- .../MachineExtensionsDeleteSamples.java | 4 +- .../MachineExtensionsGetSamples.java | 4 +- .../MachineExtensionsListSamples.java | 4 +- .../MachineExtensionsUpdateSamples.java | 4 +- ...chineRunCommandsCreateOrUpdateSamples.java | 42 + .../MachineRunCommandsDeleteSamples.java | 25 + .../MachineRunCommandsGetSamples.java | 25 + .../MachineRunCommandsListSamples.java | 24 + .../MachinesAssessPatchesSamples.java | 2 +- .../generated/MachinesDeleteSamples.java | 2 +- .../MachinesGetByResourceGroupSamples.java | 4 +- .../MachinesInstallPatchesSamples.java | 2 +- .../MachinesListByResourceGroupSamples.java | 2 +- .../generated/MachinesListSamples.java | 2 +- .../generated/NetworkProfileGetSamples.java | 2 +- ...gurationsGetByPrivateLinkScopeSamples.java | 2 +- ...urationsListByPrivateLinkScopeSamples.java | 2 +- ...nsReconcileForPrivateLinkScopeSamples.java | 2 +- .../generated/OperationsListSamples.java | 4 +- ...pointConnectionsCreateOrUpdateSamples.java | 4 +- ...ivateEndpointConnectionsDeleteSamples.java | 4 +- .../PrivateEndpointConnectionsGetSamples.java | 4 +- ...nectionsListByPrivateLinkScopeSamples.java | 4 +- .../PrivateLinkResourcesGetSamples.java | 4 +- ...esourcesListByPrivateLinkScopeSamples.java | 4 +- ...rivateLinkScopesCreateOrUpdateSamples.java | 8 +- .../PrivateLinkScopesDeleteSamples.java | 4 +- ...teLinkScopesGetByResourceGroupSamples.java | 4 +- ...GetValidationDetailsForMachineSamples.java | 4 +- ...LinkScopesGetValidationDetailsSamples.java | 4 +- ...eLinkScopesListByResourceGroupSamples.java | 4 +- .../PrivateLinkScopesListSamples.java | 4 +- .../PrivateLinkScopesUpdateTagsSamples.java | 4 +- ...ourceProviderUpgradeExtensionsSamples.java | 4 +- .../SettingsOperationGetSamples.java | 26 + .../SettingsOperationPatchSamples.java | 31 + .../SettingsOperationUpdateSamples.java | 30 + .../generated/AccessRulePropertiesTests.java | 2 +- .../generated/AccessRuleTests.java | 4 +- .../generated/AgentConfigurationTests.java | 2 +- .../generated/AgentUpgradeTests.java | 14 +- ...ilablePatchCountByClassificationTests.java | 2 +- .../generated/CloudMetadataTests.java | 2 +- .../ConfigurationExtensionTests.java | 5 +- .../generated/ConnectionDetailTests.java | 2 +- .../hybridcompute/generated/DiskTests.java | 44 + .../hybridcompute/generated/EsuKeyTests.java | 12 +- .../EsuProfileUpdatePropertiesTests.java | 8 +- ...sionMetadatasGetWithResponseMockTests.java | 5 +- .../ExtensionMetadatasListMockTests.java | 4 +- .../ExtensionTargetPropertiesTests.java | 10 +- .../generated/ExtensionValueInnerTests.java | 2 +- .../ExtensionValueListResultTests.java | 2 +- .../ExtensionValuePropertiesTests.java | 2 +- .../generated/FirmwareProfileTests.java | 22 + .../generated/GatewayInnerTests.java | 52 + .../generated/GatewayPropertiesTests.java | 31 + .../GatewayUpdatePropertiesTests.java | 28 + .../generated/GatewayUpdateTests.java | 44 + .../GatewaysCreateOrUpdateMockTests.java | 63 + ...tByResourceGroupWithResponseMockTests.java | 43 + .../GatewaysListByResourceGroupMockTests.java | 43 + .../generated/GatewaysListMockTests.java | 42 + .../generated/GatewaysListResultTests.java | 56 + .../generated/HardwareProfileTests.java | 23 + ...bridComputePrivateLinkScopeInnerTests.java | 24 +- ...omputePrivateLinkScopeListResultTests.java | 39 +- ...omputePrivateLinkScopePropertiesTests.java | 10 +- .../generated/IdentityTests.java | 6 +- .../generated/IpAddressTests.java | 15 +- ...ineInstanceViewSoftwareAssuranceTests.java | 8 +- ...pdatePropertiesSoftwareAssuranceTests.java | 8 +- .../LicenseProfileUpdatePropertiesTests.java | 36 +- .../generated/LicenseProfileUpdateTests.java | 45 +- .../LicensesCreateOrUpdateMockTests.java | 47 +- .../generated/LicensesDeleteMockTests.java | 2 +- ...tByResourceGroupWithResponseMockTests.java | 22 +- .../LicensesListByResourceGroupMockTests.java | 22 +- .../generated/LicensesListMockTests.java | 18 +- .../LicensesValidateLicenseMockTests.java | 38 +- .../generated/LinuxParametersTests.java | 14 +- .../generated/LocationDataTests.java | 29 +- ...MachineExtensionUpdatePropertiesTests.java | 43 +- .../MachineExtensionUpdateTests.java | 37 +- .../MachineExtensionUpgradeTests.java | 17 +- .../MachineExtensionsDeleteMockTests.java | 2 +- .../MachineInstallPatchesParametersTests.java | 58 +- .../MachineRunCommandScriptSourceTests.java | 39 + .../MachineRunCommandUpdateTests.java | 41 + .../generated/MachineUpdateTests.java | 80 +- ...eByResourceGroupWithResponseMockTests.java | 2 +- .../generated/NetworkInterfaceTests.java | 24 +- .../generated/NetworkProfileInnerTests.java | 55 +- ...tworkProfilesGetWithResponseMockTests.java | 14 +- ...urityPerimeterConfigurationInnerTests.java | 2 +- ...PerimeterConfigurationListResultTests.java | 2 +- ...PerimeterConfigurationPropertiesTests.java | 2 +- ...onfigurationReconcileResultInnerTests.java | 11 +- ...PrivateLinkScopeWithResponseMockTests.java | 5 +- ...ationsListByPrivateLinkScopeMockTests.java | 4 +- ...ReconcileForPrivateLinkScopeMockTests.java | 6 +- .../NetworkSecurityPerimeterProfileTests.java | 2 +- .../NetworkSecurityPerimeterTests.java | 2 +- .../generated/OperationListResultTests.java | 2 +- .../generated/OperationValueDisplayTests.java | 2 +- .../generated/OperationValueInnerTests.java | 2 +- .../generated/OperationsListMockTests.java | 2 +- ...ivateEndpointConnectionDataModelTests.java | 21 +- .../PrivateEndpointConnectionInnerTests.java | 23 +- ...vateEndpointConnectionListResultTests.java | 2 +- ...vateEndpointConnectionPropertiesTests.java | 23 +- ...intConnectionsCreateOrUpdateMockTests.java | 18 +- ...ateEndpointConnectionsDeleteMockTests.java | 2 +- ...ntConnectionsGetWithResponseMockTests.java | 10 +- ...ctionsListByPrivateLinkScopeMockTests.java | 10 +- .../PrivateEndpointPropertyTests.java | 8 +- .../PrivateLinkResourceInnerTests.java | 2 +- .../PrivateLinkResourceListResultTests.java | 2 +- .../PrivateLinkResourcePropertiesTests.java | 2 +- ...LinkResourcesGetWithResponseMockTests.java | 4 +- ...ourcesListByPrivateLinkScopeMockTests.java | 6 +- ...eLinkScopeValidationDetailsInnerTests.java | 14 +- ...esCreateOrUpdateWithResponseMockTests.java | 19 +- .../PrivateLinkScopesDeleteMockTests.java | 2 +- ...tByResourceGroupWithResponseMockTests.java | 11 +- ...etailsForMachineWithResponseMockTests.java | 7 +- ...alidationDetailsWithResponseMockTests.java | 4 +- ...inkScopesListByResourceGroupMockTests.java | 10 +- .../PrivateLinkScopesListMockTests.java | 8 +- .../PrivateLinkScopesResourceTests.java | 15 +- ...nkServiceConnectionStatePropertyTests.java | 16 +- .../generated/ProcessorTests.java | 22 + .../generated/ProductFeatureUpdateTests.java | 14 +- .../ProductProfileUpdatePropertiesTests.java | 13 +- .../ProvisioningIssuePropertiesTests.java | 2 +- .../generated/ProvisioningIssueTests.java | 2 +- .../generated/ResourceAssociationTests.java | 2 +- ...ceProvidersUpgradeExtensionsMockTests.java | 9 +- .../RunCommandInputParameterTests.java | 29 + .../RunCommandManagedIdentityTests.java | 28 + .../generated/ServiceStatusTests.java | 12 +- .../generated/ServiceStatusesTests.java | 24 +- .../SettingsGatewayPropertiesTests.java | 25 + .../generated/SettingsInnerTests.java | 26 + ...ngsOperationsGetWithResponseMockTests.java | 39 + ...sOperationsPatchWithResponseMockTests.java | 41 + ...OperationsUpdateWithResponseMockTests.java | 41 + .../generated/SettingsPropertiesTests.java | 26 + .../generated/StorageProfileTests.java | 61 + .../hybridcompute/generated/SubnetTests.java | 8 +- .../generated/TagsResourceTests.java | 10 +- .../generated/WindowsParametersTests.java | 27 +- 234 files changed, 12843 insertions(+), 763 deletions(-) create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/GatewaysClient.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/SettingsOperationsClient.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayInner.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayProperties.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayUpdateProperties.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandInner.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandProperties.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsGatewayProperties.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsInner.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsProperties.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewayImpl.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysClientImpl.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysImpl.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandImpl.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsClientImpl.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsImpl.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsImpl.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsClientImpl.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsImpl.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Disk.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExecutionState.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsResourceStatus.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsStatusLevelTypes.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/FirmwareProfile.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateway.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayType.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayUpdate.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateways.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewaysListResult.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HardwareProfile.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommand.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandInstanceView.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandScriptSource.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandUpdate.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandsListResult.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Processor.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandInputParameter.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandManagedIdentity.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Settings.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SettingsOperations.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StorageProfile.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysDeleteSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysUpdateSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsCreateOrUpdateSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsDeleteSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsGetSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsListSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationGetSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationPatchSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationUpdateSamples.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/DiskTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/FirmwareProfileTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayInnerTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayPropertiesTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdatePropertiesTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdateTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateMockTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupWithResponseMockTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupMockTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListMockTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListResultTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HardwareProfileTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandScriptSourceTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandUpdateTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProcessorTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandInputParameterTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandManagedIdentityTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsGatewayPropertiesTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsInnerTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsGetWithResponseMockTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsPatchWithResponseMockTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsUpdateWithResponseMockTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsPropertiesTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/StorageProfileTests.java diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md index 69ca6e17cb36f..d3f7f770b29fe 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md @@ -1,14 +1,99 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2024-11-14) + +- Azure Resource Manager HybridCompute client library for Java. This package contains Microsoft Azure SDK for HybridCompute Management SDK. The Hybrid Compute Management Client. Package tag package-preview-2024-07. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.MachineRunCommandsListResult` was added + +* `models.Gateway$DefinitionStages` was added -### Bugs Fixed +* `models.GatewaysListResult` was added + +* `models.MachineRunCommand$UpdateStages` was added + +* `models.Settings` was added + +* `models.MachineRunCommand` was added + +* `models.StorageProfile` was added + +* `models.Gateway$Definition` was added + +* `models.SettingsOperations` was added + +* `models.MachineRunCommandUpdate` was added + +* `models.MachineRunCommand$Update` was added + +* `models.GatewayUpdate` was added + +* `models.MachineRunCommand$Definition` was added + +* `models.Gateway$Update` was added + +* `models.Processor` was added + +* `models.ExtensionsStatusLevelTypes` was added + +* `models.Gateway` was added + +* `models.Disk` was added + +* `models.ExtensionsResourceStatus` was added + +* `models.GatewayType` was added -### Other Changes +* `models.MachineRunCommandInstanceView` was added + +* `models.HardwareProfile` was added + +* `models.RunCommandManagedIdentity` was added + +* `models.MachineRunCommands` was added + +* `models.FirmwareProfile` was added + +* `models.Gateways` was added + +* `models.Gateway$UpdateStages` was added + +* `models.MachineRunCommandScriptSource` was added + +* `models.RunCommandInputParameter` was added + +* `models.MachineRunCommand$DefinitionStages` was added + +* `models.ExecutionState` was added + +#### `models.MachineProperties` was modified + +* `firmwareProfile()` was added +* `storageProfile()` was added +* `hardwareProfile()` was added + +#### `models.NetworkInterface` was modified + +* `id()` was added +* `macAddress()` was added +* `withName(java.lang.String)` was added +* `withId(java.lang.String)` was added +* `name()` was added +* `withMacAddress(java.lang.String)` was added + +#### `models.Machine` was modified + +* `hardwareProfile()` was added +* `storageProfile()` was added +* `firmwareProfile()` was added + +#### `HybridComputeManager` was modified + +* `settingsOperations()` was added +* `gateways()` was added +* `machineRunCommands()` was added ## 1.0.0 (2024-10-10) diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/README.md b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/README.md index de84516a49659..cc5fd189003c7 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. The Hybrid Compute Management Client. Package tag package-2024-07. 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-2024-07. 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.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md index a5db0b43a5e0c..bc3bf3d764f1c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md @@ -6,6 +6,15 @@ - [Get](#extensionmetadata_get) - [List](#extensionmetadata_list) +## Gateways + +- [CreateOrUpdate](#gateways_createorupdate) +- [Delete](#gateways_delete) +- [GetByResourceGroup](#gateways_getbyresourcegroup) +- [List](#gateways_list) +- [ListByResourceGroup](#gateways_listbyresourcegroup) +- [Update](#gateways_update) + ## LicenseProfiles - [CreateOrUpdate](#licenseprofiles_createorupdate) @@ -32,6 +41,13 @@ - [List](#machineextensions_list) - [Update](#machineextensions_update) +## MachineRunCommands + +- [CreateOrUpdate](#machineruncommands_createorupdate) +- [Delete](#machineruncommands_delete) +- [Get](#machineruncommands_get) +- [List](#machineruncommands_list) + ## Machines - [AssessPatches](#machines_assesspatches) @@ -81,6 +97,12 @@ ## ResourceProvider - [UpgradeExtensions](#resourceprovider_upgradeextensions) + +## SettingsOperation + +- [Get](#settingsoperation_get) +- [Patch](#settingsoperation_patch) +- [Update](#settingsoperation_update) ### ExtensionMetadata_Get ```java @@ -90,8 +112,8 @@ public final class ExtensionMetadataGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * ExtensionMetadata_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * extension/ExtensionMetadata_Get.json */ /** * Sample code: GET an extensions metadata. @@ -115,8 +137,8 @@ public final class ExtensionMetadataGetSamples { public final class ExtensionMetadataListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * ExtensionMetadata_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * extension/ExtensionMetadata_List.json */ /** * Sample code: GET a list of extensions. @@ -130,6 +152,162 @@ public final class ExtensionMetadataListSamples { } ``` +### Gateways_CreateOrUpdate + +```java +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +import java.util.Arrays; + +/** + * Samples for Gateways CreateOrUpdate. + */ +public final class GatewaysCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update a Gateway. + * + * @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(); + } +} +``` + +### Gateways_Delete + +```java +/** + * Samples for Gateways Delete. + */ +public final class GatewaysDeleteSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_Delete.json + */ + /** + * Sample code: Delete a Gateway. + * + * @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); + } +} +``` + +### Gateways_GetByResourceGroup + +```java +/** + * Samples for Gateways GetByResourceGroup. + */ +public final class GatewaysGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_Get.json + */ + /** + * Sample code: Get Gateway. + * + * @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); + } +} +``` + +### Gateways_List + +```java +/** + * Samples for Gateways List. + */ +public final class GatewaysListSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_ListBySubscription.json + */ + /** + * Sample code: List Gateways by Subscription. + * + * @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); + } +} +``` + +### Gateways_ListByResourceGroup + +```java +/** + * Samples for Gateways ListByResourceGroup. + */ +public final class GatewaysListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_ListByResourceGroup.json + */ + /** + * Sample code: List Gateways by Resource Group. + * + * @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); + } +} +``` + +### Gateways_Update + +```java +import com.azure.resourcemanager.hybridcompute.models.Gateway; +import java.util.Arrays; + +/** + * Samples for Gateways Update. + */ +public final class GatewaysUpdateSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_Update.json + */ + /** + * Sample code: Update a Gateway. + * + * @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(); + } +} +``` + ### LicenseProfiles_CreateOrUpdate ```java @@ -144,8 +322,8 @@ import java.util.Arrays; public final class LicenseProfilesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_CreateOrUpdate.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * licenseProfile/LicenseProfile_CreateOrUpdate.json */ /** * Sample code: Create or Update a License Profile. @@ -178,8 +356,8 @@ public final class LicenseProfilesCreateOrUpdateSamples { public final class LicenseProfilesDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_Delete.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * licenseProfile/LicenseProfile_Delete.json */ /** * Sample code: Delete a License Profile. @@ -201,8 +379,8 @@ public final class LicenseProfilesDeleteSamples { public final class LicenseProfilesGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * licenseProfile/LicenseProfile_Get.json */ /** * Sample code: Get License Profile. @@ -224,8 +402,8 @@ public final class LicenseProfilesGetSamples { public final class LicenseProfilesListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * licenseProfile/LicenseProfile_List.json */ /** * Sample code: List all License Profiles. @@ -253,8 +431,8 @@ import java.util.Arrays; public final class LicenseProfilesUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_Update.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * licenseProfile/LicenseProfile_Update.json */ /** * Sample code: Update a License Profile. @@ -293,7 +471,7 @@ import com.azure.resourcemanager.hybridcompute.models.LicenseType; public final class LicensesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_CreateOrUpdate.json */ /** @@ -326,7 +504,7 @@ public final class LicensesCreateOrUpdateSamples { public final class LicensesDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_Delete.json */ /** @@ -349,7 +527,7 @@ public final class LicensesDeleteSamples { public final class LicensesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_Get.json */ /** @@ -373,7 +551,7 @@ public final class LicensesGetByResourceGroupSamples { public final class LicensesListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_ListBySubscription.json */ /** @@ -397,7 +575,7 @@ public final class LicensesListSamples { public final class LicensesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_ListByResourceGroup.json */ /** @@ -427,7 +605,7 @@ import com.azure.resourcemanager.hybridcompute.models.LicenseType; public final class LicensesUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_Update.json */ /** @@ -468,7 +646,7 @@ import com.azure.resourcemanager.hybridcompute.models.LicenseType; public final class LicensesValidateLicenseSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_ValidateLicense.json */ /** @@ -503,8 +681,8 @@ import java.util.Map; public final class MachineExtensionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_CreateOrUpdate.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * extension/Extension_CreateOrUpdate.json */ /** * Sample code: Create or Update a Machine Extension. @@ -549,8 +727,8 @@ public final class MachineExtensionsCreateOrUpdateSamples { public final class MachineExtensionsDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_Delete.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * extension/Extension_Delete.json */ /** * Sample code: Delete a Machine Extension. @@ -572,8 +750,8 @@ public final class MachineExtensionsDeleteSamples { public final class MachineExtensionsGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * extension/Extension_Get.json */ /** * Sample code: GET Machine Extension. @@ -596,8 +774,8 @@ public final class MachineExtensionsGetSamples { public final class MachineExtensionsListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * extension/Extension_List.json */ /** * Sample code: GET all Machine Extensions - List. @@ -624,8 +802,8 @@ import java.util.Map; public final class MachineExtensionsUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_Update.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * extension/Extension_Update.json */ /** * Sample code: Create or Update a Machine Extension. @@ -661,6 +839,118 @@ public final class MachineExtensionsUpdateSamples { } ``` +### MachineRunCommands_CreateOrUpdate + +```java +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandScriptSource; +import com.azure.resourcemanager.hybridcompute.models.RunCommandInputParameter; +import java.util.Arrays; + +/** + * Samples for MachineRunCommands CreateOrUpdate. + */ +public final class MachineRunCommandsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * runCommand/RunCommands_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update a Run Command. + * + * @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(); + } +} +``` + +### MachineRunCommands_Delete + +```java +/** + * Samples for MachineRunCommands Delete. + */ +public final class MachineRunCommandsDeleteSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * runCommand/RunCommands_Delete.json + */ + /** + * Sample code: Delete a Machine Run Command. + * + * @param manager Entry point to HybridComputeManager. + */ + public static void deleteAMachineRunCommand(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineRunCommands() + .delete("myResourceGroup", "myMachine", "myRunCommand", com.azure.core.util.Context.NONE); + } +} +``` + +### MachineRunCommands_Get + +```java +/** + * Samples for MachineRunCommands Get. + */ +public final class MachineRunCommandsGetSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * runCommand/RunCommands_Get.json + */ + /** + * Sample code: Get a Run Command. + * + * @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); + } +} +``` + +### MachineRunCommands_List + +```java +/** + * Samples for MachineRunCommands List. + */ +public final class MachineRunCommandsListSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * runCommand/RunCommands_List.json + */ + /** + * Sample code: GET all Machine Run Commands. + * + * @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); + } +} +``` + ### Machines_AssessPatches ```java @@ -670,7 +960,7 @@ public final class MachineExtensionsUpdateSamples { public final class MachinesAssessPatchesSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machine_AssessPatches.json */ /** @@ -694,7 +984,7 @@ public final class MachinesAssessPatchesSamples { public final class MachinesDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_Delete.json */ /** @@ -720,7 +1010,7 @@ import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; public final class MachinesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_Get_LicenseProfileInstanceView.json */ /** @@ -737,7 +1027,7 @@ public final class MachinesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_Get.json */ /** @@ -769,7 +1059,7 @@ import java.util.Arrays; public final class MachinesInstallPatchesSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machine_InstallPatches.json */ /** @@ -801,7 +1091,7 @@ public final class MachinesInstallPatchesSamples { public final class MachinesListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_ListBySubscription.json */ /** @@ -825,7 +1115,7 @@ public final class MachinesListSamples { public final class MachinesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_ListByResourceGroup.json */ /** @@ -849,7 +1139,7 @@ public final class MachinesListByResourceGroupSamples { public final class NetworkProfileGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ * NetworkProfile_Get.json */ /** @@ -872,7 +1162,7 @@ public final class NetworkProfileGetSamples { public final class NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json */ /** @@ -898,7 +1188,7 @@ public final class NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSa public final class NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json */ /** @@ -923,7 +1213,7 @@ public final class NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeS public final class NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json */ /** @@ -949,8 +1239,8 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileForPrivateLink public final class OperationsListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/Operations_List. - * json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * Operations_List.json */ /** * Sample code: List Hybrid Compute Provider Operations. @@ -976,8 +1266,8 @@ import com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnecti public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/ - * PrivateEndpointConnection_Update.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_Update.json */ /** * Sample code: Approve or reject a private endpoint connection with a given name. @@ -1006,8 +1296,8 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/ - * PrivateEndpointConnection_Delete.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_Delete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. @@ -1032,8 +1322,8 @@ public final class PrivateEndpointConnectionsDeleteSamples { public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/ - * PrivateEndpointConnection_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_Get.json */ /** * Sample code: Gets private endpoint connection. @@ -1058,8 +1348,8 @@ public final class PrivateEndpointConnectionsGetSamples { public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/ - * PrivateEndpointConnection_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateEndpoint/PrivateEndpointConnection_List.json */ /** * Sample code: Gets list of private endpoint connections on a private link scope. @@ -1083,8 +1373,8 @@ public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopePrivateLinkResource_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json */ /** * Sample code: Gets private endpoint connection. @@ -1109,8 +1399,8 @@ public final class PrivateLinkResourcesGetSamples { public final class PrivateLinkResourcesListByPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopePrivateLinkResource_ListGet.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json */ /** * Sample code: Gets private endpoint connection. @@ -1137,8 +1427,8 @@ import java.util.Map; public final class PrivateLinkScopesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_Create.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Create.json */ /** * Sample code: PrivateLinkScopeCreate. @@ -1155,8 +1445,8 @@ public final class PrivateLinkScopesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_Update.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Update.json */ /** * Sample code: PrivateLinkScopeUpdate. @@ -1195,8 +1485,8 @@ public final class PrivateLinkScopesCreateOrUpdateSamples { public final class PrivateLinkScopesDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_Delete.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Delete.json */ /** * Sample code: PrivateLinkScopesDelete. @@ -1219,8 +1509,8 @@ public final class PrivateLinkScopesDeleteSamples { public final class PrivateLinkScopesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Get.json */ /** * Sample code: PrivateLinkScopeGet. @@ -1244,8 +1534,8 @@ public final class PrivateLinkScopesGetByResourceGroupSamples { public final class PrivateLinkScopesGetValidationDetailsSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_GetValidation.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_GetValidation.json */ /** * Sample code: PrivateLinkScopeGet. @@ -1269,8 +1559,8 @@ public final class PrivateLinkScopesGetValidationDetailsSamples { public final class PrivateLinkScopesGetValidationDetailsForMachineSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_GetValidationForMachine.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json */ /** * Sample code: PrivateLinkScopeGet. @@ -1294,8 +1584,8 @@ public final class PrivateLinkScopesGetValidationDetailsForMachineSamples { public final class PrivateLinkScopesListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_List.json */ /** * Sample code: PrivateLinkScopesList.json. @@ -1317,8 +1607,8 @@ public final class PrivateLinkScopesListSamples { public final class PrivateLinkScopesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_ListByResourceGroup.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json */ /** * Sample code: PrivateLinkScopeListByResourceGroup. @@ -1345,8 +1635,8 @@ import java.util.Map; public final class PrivateLinkScopesUpdateTagsSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_UpdateTagsOnly.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json */ /** * Sample code: PrivateLinkScopeUpdateTagsOnly. @@ -1390,8 +1680,8 @@ import java.util.Map; public final class ResourceProviderUpgradeExtensionsSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extensions_Upgrade.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * extension/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. @@ -1421,3 +1711,87 @@ public final class ResourceProviderUpgradeExtensionsSamples { } ``` +### SettingsOperation_Get + +```java +/** + * Samples for SettingsOperation Get. + */ +public final class SettingsOperationGetSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings + * /SettingsGet.json + */ + /** + * Sample code: NetworkConfigurationsGet. + * + * @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", + com.azure.core.util.Context.NONE); + } +} +``` + +### SettingsOperation_Patch + +```java +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; + +/** + * Samples for SettingsOperation Patch. + */ +public final class SettingsOperationPatchSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings + * /SettingsPatch.json + */ + /** + * Sample code: NetworkConfigurationsPatch. + * + * @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"), + com.azure.core.util.Context.NONE); + } +} +``` + +### SettingsOperation_Update + +```java +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; + +/** + * Samples for SettingsOperation Update. + */ +public final class SettingsOperationUpdateSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings + * /SettingsUpdate.json + */ + /** + * Sample code: SettingsUpdate. + * + * @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); + } +} +``` + diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml index 812d77c2182fd..dfecf0c2015bf 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/pom.xml @@ -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. The Hybrid Compute Management Client. Package tag package-2024-07. + 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-2024-07. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,8 @@ UTF-8 0 0 + true + false 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 9475f7c83b6ef..8d0c679dcbe15 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 @@ -11,6 +11,7 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -19,16 +20,17 @@ import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridcompute.fluent.HybridComputeManagementClient; import com.azure.resourcemanager.hybridcompute.implementation.ExtensionMetadatasImpl; +import com.azure.resourcemanager.hybridcompute.implementation.GatewaysImpl; import com.azure.resourcemanager.hybridcompute.implementation.HybridComputeManagementClientBuilder; import com.azure.resourcemanager.hybridcompute.implementation.LicenseProfilesImpl; import com.azure.resourcemanager.hybridcompute.implementation.LicensesImpl; import com.azure.resourcemanager.hybridcompute.implementation.MachineExtensionsImpl; +import com.azure.resourcemanager.hybridcompute.implementation.MachineRunCommandsImpl; import com.azure.resourcemanager.hybridcompute.implementation.MachinesImpl; import com.azure.resourcemanager.hybridcompute.implementation.NetworkProfilesImpl; import com.azure.resourcemanager.hybridcompute.implementation.NetworkSecurityPerimeterConfigurationsImpl; @@ -37,10 +39,13 @@ import com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkResourcesImpl; import com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkScopesImpl; import com.azure.resourcemanager.hybridcompute.implementation.ResourceProvidersImpl; +import com.azure.resourcemanager.hybridcompute.implementation.SettingsOperationsImpl; import com.azure.resourcemanager.hybridcompute.models.ExtensionMetadatas; +import com.azure.resourcemanager.hybridcompute.models.Gateways; import com.azure.resourcemanager.hybridcompute.models.LicenseProfiles; import com.azure.resourcemanager.hybridcompute.models.Licenses; import com.azure.resourcemanager.hybridcompute.models.MachineExtensions; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommands; import com.azure.resourcemanager.hybridcompute.models.Machines; import com.azure.resourcemanager.hybridcompute.models.NetworkProfiles; import com.azure.resourcemanager.hybridcompute.models.NetworkSecurityPerimeterConfigurations; @@ -49,6 +54,7 @@ import com.azure.resourcemanager.hybridcompute.models.PrivateLinkResources; import com.azure.resourcemanager.hybridcompute.models.PrivateLinkScopes; import com.azure.resourcemanager.hybridcompute.models.ResourceProviders; +import com.azure.resourcemanager.hybridcompute.models.SettingsOperations; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -77,6 +83,12 @@ public final class HybridComputeManager { private NetworkProfiles networkProfiles; + private MachineRunCommands machineRunCommands; + + private Gateways gateways; + + private SettingsOperations settingsOperations; + private PrivateLinkScopes privateLinkScopes; private PrivateLinkResources privateLinkResources; @@ -249,7 +261,7 @@ public HybridComputeManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.hybridcompute") .append("/") - .append("1.0.0"); + .append("1.1.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -282,7 +294,7 @@ public HybridComputeManager authenticate(TokenCredential credential, AzureProfil HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -391,6 +403,42 @@ public NetworkProfiles networkProfiles() { return networkProfiles; } + /** + * Gets the resource collection API of MachineRunCommands. It manages MachineRunCommand. + * + * @return Resource collection API of MachineRunCommands. + */ + public MachineRunCommands machineRunCommands() { + if (this.machineRunCommands == null) { + this.machineRunCommands = new MachineRunCommandsImpl(clientObject.getMachineRunCommands(), this); + } + return machineRunCommands; + } + + /** + * Gets the resource collection API of Gateways. It manages Gateway. + * + * @return Resource collection API of Gateways. + */ + public Gateways gateways() { + if (this.gateways == null) { + this.gateways = new GatewaysImpl(clientObject.getGateways(), this); + } + return gateways; + } + + /** + * Gets the resource collection API of SettingsOperations. + * + * @return Resource collection API of SettingsOperations. + */ + public SettingsOperations settingsOperations() { + if (this.settingsOperations == null) { + this.settingsOperations = new SettingsOperationsImpl(clientObject.getSettingsOperations(), this); + } + return settingsOperations; + } + /** * Gets the resource collection API of PrivateLinkScopes. It manages HybridComputePrivateLinkScope. * 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 new file mode 100644 index 0000000000000..cdb671bccda7e --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/GatewaysClient.java @@ -0,0 +1,237 @@ +// 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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner; +import com.azure.resourcemanager.hybridcompute.models.GatewayUpdate; + +/** + * An instance of this class provides access to all the operations defined in GatewaysClient. + */ +public interface GatewaysClient { + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GatewayInner> beginCreateOrUpdate(String resourceGroupName, String gatewayName, + GatewayInner parameters); + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway 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 {@link SyncPoller} for polling of describes an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, GatewayInner> beginCreateOrUpdate(String resourceGroupName, String gatewayName, + GatewayInner parameters, Context context); + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 createOrUpdate(String resourceGroupName, String gatewayName, GatewayInner parameters); + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway 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 an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + GatewayInner createOrUpdate(String resourceGroupName, String gatewayName, GatewayInner parameters, Context context); + + /** + * The operation to update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Update gateway 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 an Arc Gateway along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String gatewayName, GatewayUpdate parameters, + Context context); + + /** + * The operation to update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Update gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 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. + * + * @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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String gatewayName); + + /** + * The operation to delete 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String gatewayName, Context context); + + /** + * The operation to delete 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String gatewayName); + + /** + * The operation to delete 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String gatewayName, Context context); + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @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 license operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List license operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List license operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * The operation to get all gateways of a non-Azure 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 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 f63d1c882ebd8..0f6a42748f2a9 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 @@ -102,6 +102,27 @@ public interface HybridComputeManagementClient { */ NetworkProfilesClient getNetworkProfiles(); + /** + * Gets the MachineRunCommandsClient object to access its operations. + * + * @return the MachineRunCommandsClient object. + */ + MachineRunCommandsClient getMachineRunCommands(); + + /** + * Gets the GatewaysClient object to access its operations. + * + * @return the GatewaysClient object. + */ + GatewaysClient getGateways(); + + /** + * Gets the SettingsOperationsClient object to access its operations. + * + * @return the SettingsOperationsClient object. + */ + SettingsOperationsClient getSettingsOperations(); + /** * Gets the PrivateLinkScopesClient object to access its operations. * 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 8a3dbc14fa0e8..a2cfd8312a9c6 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 @@ -85,7 +85,7 @@ MachineExtensionInner createOrUpdate(String resourceGroupName, String machineNam MachineExtensionInner extensionParameters, Context context); /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -101,7 +101,7 @@ SyncPoller, MachineExtensionInner> beginUpdate String machineName, String extensionName, MachineExtensionUpdate extensionParameters); /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -118,7 +118,7 @@ SyncPoller, MachineExtensionInner> beginUpdate String machineName, String extensionName, MachineExtensionUpdate extensionParameters, Context context); /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -134,7 +134,7 @@ MachineExtensionInner update(String resourceGroupName, String machineName, Strin MachineExtensionUpdate extensionParameters); /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. 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 new file mode 100644 index 0000000000000..67f1c56883fdd --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java @@ -0,0 +1,201 @@ +// 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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner; + +/** + * An instance of this class provides access to all the operations defined in MachineRunCommandsClient. + */ +public interface MachineRunCommandsClient { + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 the {@link SyncPoller} for polling of describes a Run Command. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MachineRunCommandInner> beginCreateOrUpdate(String resourceGroupName, + String machineName, String runCommandName, MachineRunCommandInner runCommandProperties); + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 the {@link SyncPoller} for polling of describes a Run Command. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MachineRunCommandInner> beginCreateOrUpdate(String resourceGroupName, + String machineName, String runCommandName, MachineRunCommandInner runCommandProperties, Context context); + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 createOrUpdate(String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties); + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MachineRunCommandInner createOrUpdate(String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties, Context context); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, String runCommandName); + + /** + * 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, String runCommandName, + Context context); + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String machineName, String runCommandName); + + /** + * 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. + */ + @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. + * + * @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 the Run Commands List Result as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String machineName); + + /** + * The operation to get all the run commands 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 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 the Run Commands List Result as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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/fluent/SettingsOperationsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/SettingsOperationsClient.java new file mode 100644 index 0000000000000..3e3fa0f8b16de --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/SettingsOperationsClient.java @@ -0,0 +1,125 @@ +// 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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; + +/** + * An instance of this class provides access to all the operations defined in SettingsOperationsClient. + */ +public interface SettingsOperationsClient { + /** + * Returns the base Settings for the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings 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 response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, Context context); + + /** + * Returns the base Settings for the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SettingsInner get(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, + String settingsResourceName); + + /** + * Updates the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + Response updateWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context); + + /** + * Updates the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + SettingsInner update(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters); + + /** + * Update the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + Response patchWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context); + + /** + * Update the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + SettingsInner 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/fluent/models/GatewayInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayInner.java new file mode 100644 index 0000000000000..5816a0fcdc145 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayInner.java @@ -0,0 +1,256 @@ +// 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.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.GatewayType; +import com.azure.resourcemanager.hybridcompute.models.ProvisioningState; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Describes an Arc Gateway. + */ +@Fluent +public final class GatewayInner extends Resource { + /* + * Hybrid Compute Gateway properties + */ + private GatewayProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of GatewayInner class. + */ + public GatewayInner() { + } + + /** + * Get the innerProperties property: Hybrid Compute Gateway properties. + * + * @return the innerProperties value. + */ + private GatewayProperties 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. + * + * @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 GatewayInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public GatewayInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the gatewayId property: A unique, immutable, identifier for the Gateway. + * + * @return the gatewayId value. + */ + public String gatewayId() { + return this.innerProperties() == null ? null : this.innerProperties().gatewayId(); + } + + /** + * Get the gatewayType property: The type of the Gateway resource. + * + * @return the gatewayType value. + */ + public GatewayType gatewayType() { + return this.innerProperties() == null ? null : this.innerProperties().gatewayType(); + } + + /** + * Set the gatewayType property: The type of the Gateway resource. + * + * @param gatewayType the gatewayType value to set. + * @return the GatewayInner object itself. + */ + public GatewayInner withGatewayType(GatewayType gatewayType) { + if (this.innerProperties() == null) { + this.innerProperties = new GatewayProperties(); + } + this.innerProperties().withGatewayType(gatewayType); + return this; + } + + /** + * Get the gatewayEndpoint property: The endpoint fqdn for the Gateway. + * + * @return the gatewayEndpoint value. + */ + public String gatewayEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().gatewayEndpoint(); + } + + /** + * Get the allowedFeatures property: Specifies the list of features that are enabled for this Gateway. + * + * @return the allowedFeatures value. + */ + public List allowedFeatures() { + return this.innerProperties() == null ? null : this.innerProperties().allowedFeatures(); + } + + /** + * Set the allowedFeatures property: Specifies the list of features that are enabled for this Gateway. + * + * @param allowedFeatures the allowedFeatures value to set. + * @return the GatewayInner object itself. + */ + public GatewayInner withAllowedFeatures(List allowedFeatures) { + if (this.innerProperties() == null) { + this.innerProperties = new GatewayProperties(); + } + this.innerProperties().withAllowedFeatures(allowedFeatures); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().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)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GatewayInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GatewayInner 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 GatewayInner. + */ + public static GatewayInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GatewayInner deserializedGatewayInner = new GatewayInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedGatewayInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedGatewayInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedGatewayInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedGatewayInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedGatewayInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedGatewayInner.innerProperties = GatewayProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedGatewayInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGatewayInner; + }); + } +} 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 new file mode 100644 index 0000000000000..b83f7e5064984 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayProperties.java @@ -0,0 +1,174 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +import com.azure.resourcemanager.hybridcompute.models.ProvisioningState; +import java.io.IOException; +import java.util.List; + +/** + * Describes the properties of a Gateway Profile. + */ +@Fluent +public final class GatewayProperties implements JsonSerializable { + /* + * The provisioning state, which only appears in the response. + */ + private ProvisioningState provisioningState; + + /* + * A unique, immutable, identifier for the Gateway. + */ + private String gatewayId; + + /* + * The type of the Gateway resource. + */ + private GatewayType gatewayType; + + /* + * The endpoint fqdn for the Gateway. + */ + private String gatewayEndpoint; + + /* + * Specifies the list of features that are enabled for this Gateway. + */ + private List allowedFeatures; + + /** + * Creates an instance of GatewayProperties class. + */ + public GatewayProperties() { + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the gatewayId property: A unique, immutable, identifier for the Gateway. + * + * @return the gatewayId value. + */ + public String gatewayId() { + return this.gatewayId; + } + + /** + * Get the gatewayType property: The type of the Gateway resource. + * + * @return the gatewayType value. + */ + public GatewayType gatewayType() { + return this.gatewayType; + } + + /** + * Set the gatewayType property: The type of the Gateway resource. + * + * @param gatewayType the gatewayType value to set. + * @return the GatewayProperties object itself. + */ + public GatewayProperties withGatewayType(GatewayType gatewayType) { + this.gatewayType = gatewayType; + return this; + } + + /** + * Get the gatewayEndpoint property: The endpoint fqdn for the Gateway. + * + * @return the gatewayEndpoint value. + */ + public String gatewayEndpoint() { + return this.gatewayEndpoint; + } + + /** + * Get the allowedFeatures property: Specifies the list of features that are enabled for this Gateway. + * + * @return the allowedFeatures value. + */ + public List allowedFeatures() { + return this.allowedFeatures; + } + + /** + * Set the allowedFeatures property: Specifies the list of features that are enabled for this Gateway. + * + * @param allowedFeatures the allowedFeatures value to set. + * @return the GatewayProperties object itself. + */ + public GatewayProperties withAllowedFeatures(List allowedFeatures) { + this.allowedFeatures = allowedFeatures; + 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("gatewayType", this.gatewayType == null ? null : this.gatewayType.toString()); + jsonWriter.writeArrayField("allowedFeatures", this.allowedFeatures, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GatewayProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GatewayProperties 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 GatewayProperties. + */ + public static GatewayProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GatewayProperties deserializedGatewayProperties = new GatewayProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedGatewayProperties.provisioningState = ProvisioningState.fromString(reader.getString()); + } else if ("gatewayId".equals(fieldName)) { + deserializedGatewayProperties.gatewayId = reader.getString(); + } else if ("gatewayType".equals(fieldName)) { + deserializedGatewayProperties.gatewayType = GatewayType.fromString(reader.getString()); + } else if ("gatewayEndpoint".equals(fieldName)) { + deserializedGatewayProperties.gatewayEndpoint = reader.getString(); + } else if ("allowedFeatures".equals(fieldName)) { + List allowedFeatures = reader.readArray(reader1 -> reader1.getString()); + deserializedGatewayProperties.allowedFeatures = allowedFeatures; + } else { + reader.skipChildren(); + } + } + + return deserializedGatewayProperties; + }); + } +} 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 new file mode 100644 index 0000000000000..98a1c16497c30 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/GatewayUpdateProperties.java @@ -0,0 +1,96 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes the Update properties of a Gateway Profile. + */ +@Fluent +public final class GatewayUpdateProperties implements JsonSerializable { + /* + * Specifies the list of features that are enabled for this Gateway. + */ + private List allowedFeatures; + + /** + * Creates an instance of GatewayUpdateProperties class. + */ + public GatewayUpdateProperties() { + } + + /** + * Get the allowedFeatures property: Specifies the list of features that are enabled for this Gateway. + * + * @return the allowedFeatures value. + */ + public List allowedFeatures() { + return this.allowedFeatures; + } + + /** + * Set the allowedFeatures property: Specifies the list of features that are enabled for this Gateway. + * + * @param allowedFeatures the allowedFeatures value to set. + * @return the GatewayUpdateProperties object itself. + */ + public GatewayUpdateProperties withAllowedFeatures(List allowedFeatures) { + this.allowedFeatures = allowedFeatures; + 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.writeArrayField("allowedFeatures", this.allowedFeatures, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GatewayUpdateProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GatewayUpdateProperties 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 GatewayUpdateProperties. + */ + public static GatewayUpdateProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GatewayUpdateProperties deserializedGatewayUpdateProperties = new GatewayUpdateProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("allowedFeatures".equals(fieldName)) { + List allowedFeatures = reader.readArray(reader1 -> reader1.getString()); + deserializedGatewayUpdateProperties.allowedFeatures = allowedFeatures; + } else { + reader.skipChildren(); + } + } + + return deserializedGatewayUpdateProperties; + }); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInner.java index 2ccba31fa1375..bf20841981bde 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInner.java @@ -15,12 +15,15 @@ import com.azure.resourcemanager.hybridcompute.models.AgentUpgrade; import com.azure.resourcemanager.hybridcompute.models.ArcKindEnum; import com.azure.resourcemanager.hybridcompute.models.CloudMetadata; +import com.azure.resourcemanager.hybridcompute.models.FirmwareProfile; +import com.azure.resourcemanager.hybridcompute.models.HardwareProfile; import com.azure.resourcemanager.hybridcompute.models.Identity; import com.azure.resourcemanager.hybridcompute.models.LocationData; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceView; import com.azure.resourcemanager.hybridcompute.models.OSProfile; import com.azure.resourcemanager.hybridcompute.models.ServiceStatuses; import com.azure.resourcemanager.hybridcompute.models.StatusTypes; +import com.azure.resourcemanager.hybridcompute.models.StorageProfile; import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -251,6 +254,33 @@ public MachineInner withServiceStatuses(ServiceStatuses serviceStatuses) { return this; } + /** + * Get the hardwareProfile property: Information about the machine's hardware. + * + * @return the hardwareProfile value. + */ + public HardwareProfile hardwareProfile() { + return this.innerProperties() == null ? null : this.innerProperties().hardwareProfile(); + } + + /** + * Get the storageProfile property: Information about the machine's storage. + * + * @return the storageProfile value. + */ + public StorageProfile storageProfile() { + return this.innerProperties() == null ? null : this.innerProperties().storageProfile(); + } + + /** + * Get the firmwareProfile property: Information about the machine's firmware. + * + * @return the firmwareProfile value. + */ + public FirmwareProfile firmwareProfile() { + return this.innerProperties() == null ? null : this.innerProperties().firmwareProfile(); + } + /** * Get the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). * 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 faff937dc78ac..372e36ac07142 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 @@ -14,11 +14,14 @@ import com.azure.resourcemanager.hybridcompute.models.AgentConfiguration; import com.azure.resourcemanager.hybridcompute.models.AgentUpgrade; import com.azure.resourcemanager.hybridcompute.models.CloudMetadata; +import com.azure.resourcemanager.hybridcompute.models.FirmwareProfile; +import com.azure.resourcemanager.hybridcompute.models.HardwareProfile; import com.azure.resourcemanager.hybridcompute.models.LocationData; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceView; import com.azure.resourcemanager.hybridcompute.models.OSProfile; import com.azure.resourcemanager.hybridcompute.models.ServiceStatuses; import com.azure.resourcemanager.hybridcompute.models.StatusTypes; +import com.azure.resourcemanager.hybridcompute.models.StorageProfile; import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; @@ -46,6 +49,21 @@ public final class MachinePropertiesInner implements JsonSerializable tags) { + super.withTags(tags); + return this; + } + + /** + * Get the source property: The source of the run command script. + * + * @return the source value. + */ + public MachineRunCommandScriptSource source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: The source of the run command script. + * + * @param source the source value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withSource(MachineRunCommandScriptSource source) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the parameters property: The parameters used by the script. + * + * @return the parameters value. + */ + public List parameters() { + return this.innerProperties() == null ? null : this.innerProperties().parameters(); + } + + /** + * Set the parameters property: The parameters used by the script. + * + * @param parameters the parameters value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withParameters(List parameters) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withParameters(parameters); + return this; + } + + /** + * Get the protectedParameters property: The parameters used by the script. + * + * @return the protectedParameters value. + */ + public List protectedParameters() { + return this.innerProperties() == null ? null : this.innerProperties().protectedParameters(); + } + + /** + * Set the protectedParameters property: The parameters used by the script. + * + * @param protectedParameters the protectedParameters value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withProtectedParameters(List protectedParameters) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withProtectedParameters(protectedParameters); + return this; + } + + /** + * Get the asyncExecution property: Optional. If set to true, provisioning will complete as soon as script starts + * and will not wait for script to complete. + * + * @return the asyncExecution value. + */ + public Boolean asyncExecution() { + return this.innerProperties() == null ? null : this.innerProperties().asyncExecution(); + } + + /** + * Set the asyncExecution property: Optional. If set to true, provisioning will complete as soon as script starts + * and will not wait for script to complete. + * + * @param asyncExecution the asyncExecution value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withAsyncExecution(Boolean asyncExecution) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withAsyncExecution(asyncExecution); + return this; + } + + /** + * Get the runAsUser property: Specifies the user account on the machine when executing the run command. + * + * @return the runAsUser value. + */ + public String runAsUser() { + return this.innerProperties() == null ? null : this.innerProperties().runAsUser(); + } + + /** + * Set the runAsUser property: Specifies the user account on the machine when executing the run command. + * + * @param runAsUser the runAsUser value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withRunAsUser(String runAsUser) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withRunAsUser(runAsUser); + return this; + } + + /** + * Get the runAsPassword property: Specifies the user account password on the machine when executing the run + * command. + * + * @return the runAsPassword value. + */ + public String runAsPassword() { + return this.innerProperties() == null ? null : this.innerProperties().runAsPassword(); + } + + /** + * Set the runAsPassword property: Specifies the user account password on the machine when executing the run + * command. + * + * @param runAsPassword the runAsPassword value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withRunAsPassword(String runAsPassword) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withRunAsPassword(runAsPassword); + return this; + } + + /** + * Get the timeoutInSeconds property: The timeout in seconds to execute the run command. + * + * @return the timeoutInSeconds value. + */ + public Integer timeoutInSeconds() { + return this.innerProperties() == null ? null : this.innerProperties().timeoutInSeconds(); + } + + /** + * Set the timeoutInSeconds property: The timeout in seconds to execute the run command. + * + * @param timeoutInSeconds the timeoutInSeconds value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withTimeoutInSeconds(Integer timeoutInSeconds) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withTimeoutInSeconds(timeoutInSeconds); + return this; + } + + /** + * Get 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. + * + * @return the outputBlobUri value. + */ + public String outputBlobUri() { + return this.innerProperties() == null ? null : this.innerProperties().outputBlobUri(); + } + + /** + * Set 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. + * + * @param outputBlobUri the outputBlobUri value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withOutputBlobUri(String outputBlobUri) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withOutputBlobUri(outputBlobUri); + return this; + } + + /** + * Get the errorBlobUri property: Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity parameter. + * + * @return the errorBlobUri value. + */ + public String errorBlobUri() { + return this.innerProperties() == null ? null : this.innerProperties().errorBlobUri(); + } + + /** + * Set the errorBlobUri property: Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity parameter. + * + * @param errorBlobUri the errorBlobUri value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withErrorBlobUri(String errorBlobUri) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withErrorBlobUri(errorBlobUri); + return this; + } + + /** + * Get the outputBlobManagedIdentity property: 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 + * 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. + * + * @return the outputBlobManagedIdentity value. + */ + public RunCommandManagedIdentity outputBlobManagedIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().outputBlobManagedIdentity(); + } + + /** + * Set the outputBlobManagedIdentity property: 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 + * 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. + * + * @param outputBlobManagedIdentity the outputBlobManagedIdentity value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withOutputBlobManagedIdentity(RunCommandManagedIdentity outputBlobManagedIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withOutputBlobManagedIdentity(outputBlobManagedIdentity); + return this; + } + + /** + * Get the errorBlobManagedIdentity property: 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 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. + * + * @return the errorBlobManagedIdentity value. + */ + public RunCommandManagedIdentity errorBlobManagedIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().errorBlobManagedIdentity(); + } + + /** + * Set the errorBlobManagedIdentity property: 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 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. + * + * @param errorBlobManagedIdentity the errorBlobManagedIdentity value to set. + * @return the MachineRunCommandInner object itself. + */ + public MachineRunCommandInner withErrorBlobManagedIdentity(RunCommandManagedIdentity errorBlobManagedIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new MachineRunCommandProperties(); + } + this.innerProperties().withErrorBlobManagedIdentity(errorBlobManagedIdentity); + return this; + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the instanceView property: The machine run command instance view. + * + * @return the instanceView value. + */ + 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineRunCommandInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineRunCommandInner 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 MachineRunCommandInner. + */ + public static MachineRunCommandInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineRunCommandInner deserializedMachineRunCommandInner = new MachineRunCommandInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedMachineRunCommandInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedMachineRunCommandInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedMachineRunCommandInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedMachineRunCommandInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMachineRunCommandInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedMachineRunCommandInner.innerProperties = MachineRunCommandProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedMachineRunCommandInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineRunCommandInner; + }); + } +} 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 new file mode 100644 index 0000000000000..3cfc397f43110 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandProperties.java @@ -0,0 +1,479 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandInstanceView; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandScriptSource; +import com.azure.resourcemanager.hybridcompute.models.RunCommandInputParameter; +import com.azure.resourcemanager.hybridcompute.models.RunCommandManagedIdentity; +import java.io.IOException; +import java.util.List; + +/** + * Describes the properties of a run command. + */ +@Fluent +public final class MachineRunCommandProperties implements JsonSerializable { + /* + * The source of the run command script. + */ + private MachineRunCommandScriptSource source; + + /* + * The parameters used by the script. + */ + private List parameters; + + /* + * The parameters used by the script. + */ + private List protectedParameters; + + /* + * Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to + * complete. + */ + private Boolean asyncExecution; + + /* + * Specifies the user account on the machine when executing the run command. + */ + private String runAsUser; + + /* + * Specifies the user account password on the machine when executing the run command. + */ + private String runAsPassword; + + /* + * The timeout in seconds to execute the run command. + */ + private Integer timeoutInSeconds; + + /* + * 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. + */ + private String outputBlobUri; + + /* + * Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity + * parameter. + */ + private String errorBlobUri; + + /* + * 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 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 + */ + private RunCommandManagedIdentity outputBlobManagedIdentity; + + /* + * 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 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 + */ + private RunCommandManagedIdentity errorBlobManagedIdentity; + + /* + * The provisioning state, which only appears in the response. + */ + private String provisioningState; + + /* + * The machine run command instance view. + */ + private MachineRunCommandInstanceView instanceView; + + /** + * Creates an instance of MachineRunCommandProperties class. + */ + public MachineRunCommandProperties() { + } + + /** + * Get the source property: The source of the run command script. + * + * @return the source value. + */ + public MachineRunCommandScriptSource source() { + return this.source; + } + + /** + * Set the source property: The source of the run command script. + * + * @param source the source value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties withSource(MachineRunCommandScriptSource source) { + this.source = source; + return this; + } + + /** + * Get the parameters property: The parameters used by the script. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: The parameters used by the script. + * + * @param parameters the parameters value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the protectedParameters property: The parameters used by the script. + * + * @return the protectedParameters value. + */ + public List protectedParameters() { + return this.protectedParameters; + } + + /** + * Set the protectedParameters property: The parameters used by the script. + * + * @param protectedParameters the protectedParameters value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties withProtectedParameters(List protectedParameters) { + this.protectedParameters = protectedParameters; + return this; + } + + /** + * Get the asyncExecution property: Optional. If set to true, provisioning will complete as soon as script starts + * and will not wait for script to complete. + * + * @return the asyncExecution value. + */ + public Boolean asyncExecution() { + return this.asyncExecution; + } + + /** + * Set the asyncExecution property: Optional. If set to true, provisioning will complete as soon as script starts + * and will not wait for script to complete. + * + * @param asyncExecution the asyncExecution value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties withAsyncExecution(Boolean asyncExecution) { + this.asyncExecution = asyncExecution; + return this; + } + + /** + * Get the runAsUser property: Specifies the user account on the machine when executing the run command. + * + * @return the runAsUser value. + */ + public String runAsUser() { + return this.runAsUser; + } + + /** + * Set the runAsUser property: Specifies the user account on the machine when executing the run command. + * + * @param runAsUser the runAsUser value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties withRunAsUser(String runAsUser) { + this.runAsUser = runAsUser; + return this; + } + + /** + * Get the runAsPassword property: Specifies the user account password on the machine when executing the run + * command. + * + * @return the runAsPassword value. + */ + public String runAsPassword() { + return this.runAsPassword; + } + + /** + * Set the runAsPassword property: Specifies the user account password on the machine when executing the run + * command. + * + * @param runAsPassword the runAsPassword value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties withRunAsPassword(String runAsPassword) { + this.runAsPassword = runAsPassword; + return this; + } + + /** + * Get the timeoutInSeconds property: The timeout in seconds to execute the run command. + * + * @return the timeoutInSeconds value. + */ + public Integer timeoutInSeconds() { + return this.timeoutInSeconds; + } + + /** + * Set the timeoutInSeconds property: The timeout in seconds to execute the run command. + * + * @param timeoutInSeconds the timeoutInSeconds value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties withTimeoutInSeconds(Integer timeoutInSeconds) { + this.timeoutInSeconds = timeoutInSeconds; + return this; + } + + /** + * Get 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. + * + * @return the outputBlobUri value. + */ + public String outputBlobUri() { + return this.outputBlobUri; + } + + /** + * Set 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. + * + * @param outputBlobUri the outputBlobUri value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties withOutputBlobUri(String outputBlobUri) { + this.outputBlobUri = outputBlobUri; + return this; + } + + /** + * Get the errorBlobUri property: Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity parameter. + * + * @return the errorBlobUri value. + */ + public String errorBlobUri() { + return this.errorBlobUri; + } + + /** + * Set the errorBlobUri property: Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity parameter. + * + * @param errorBlobUri the errorBlobUri value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties withErrorBlobUri(String errorBlobUri) { + this.errorBlobUri = errorBlobUri; + return this; + } + + /** + * Get the outputBlobManagedIdentity property: 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 + * 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. + * + * @return the outputBlobManagedIdentity value. + */ + public RunCommandManagedIdentity outputBlobManagedIdentity() { + return this.outputBlobManagedIdentity; + } + + /** + * Set the outputBlobManagedIdentity property: 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 + * 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. + * + * @param outputBlobManagedIdentity the outputBlobManagedIdentity value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties + withOutputBlobManagedIdentity(RunCommandManagedIdentity outputBlobManagedIdentity) { + this.outputBlobManagedIdentity = outputBlobManagedIdentity; + return this; + } + + /** + * Get the errorBlobManagedIdentity property: 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 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. + * + * @return the errorBlobManagedIdentity value. + */ + public RunCommandManagedIdentity errorBlobManagedIdentity() { + return this.errorBlobManagedIdentity; + } + + /** + * Set the errorBlobManagedIdentity property: 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 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. + * + * @param errorBlobManagedIdentity the errorBlobManagedIdentity value to set. + * @return the MachineRunCommandProperties object itself. + */ + public MachineRunCommandProperties + withErrorBlobManagedIdentity(RunCommandManagedIdentity errorBlobManagedIdentity) { + this.errorBlobManagedIdentity = errorBlobManagedIdentity; + return this; + } + + /** + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the instanceView property: The machine run command instance view. + * + * @return the instanceView value. + */ + 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("source", this.source); + jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("protectedParameters", this.protectedParameters, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("asyncExecution", this.asyncExecution); + jsonWriter.writeStringField("runAsUser", this.runAsUser); + jsonWriter.writeStringField("runAsPassword", this.runAsPassword); + jsonWriter.writeNumberField("timeoutInSeconds", this.timeoutInSeconds); + jsonWriter.writeStringField("outputBlobUri", this.outputBlobUri); + jsonWriter.writeStringField("errorBlobUri", this.errorBlobUri); + jsonWriter.writeJsonField("outputBlobManagedIdentity", this.outputBlobManagedIdentity); + jsonWriter.writeJsonField("errorBlobManagedIdentity", this.errorBlobManagedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineRunCommandProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineRunCommandProperties 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 MachineRunCommandProperties. + */ + public static MachineRunCommandProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineRunCommandProperties deserializedMachineRunCommandProperties = new MachineRunCommandProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("source".equals(fieldName)) { + deserializedMachineRunCommandProperties.source = MachineRunCommandScriptSource.fromJson(reader); + } else if ("parameters".equals(fieldName)) { + List parameters + = reader.readArray(reader1 -> RunCommandInputParameter.fromJson(reader1)); + deserializedMachineRunCommandProperties.parameters = parameters; + } else if ("protectedParameters".equals(fieldName)) { + List protectedParameters + = reader.readArray(reader1 -> RunCommandInputParameter.fromJson(reader1)); + deserializedMachineRunCommandProperties.protectedParameters = protectedParameters; + } else if ("asyncExecution".equals(fieldName)) { + deserializedMachineRunCommandProperties.asyncExecution = reader.getNullable(JsonReader::getBoolean); + } else if ("runAsUser".equals(fieldName)) { + deserializedMachineRunCommandProperties.runAsUser = reader.getString(); + } else if ("runAsPassword".equals(fieldName)) { + deserializedMachineRunCommandProperties.runAsPassword = reader.getString(); + } else if ("timeoutInSeconds".equals(fieldName)) { + deserializedMachineRunCommandProperties.timeoutInSeconds = reader.getNullable(JsonReader::getInt); + } else if ("outputBlobUri".equals(fieldName)) { + deserializedMachineRunCommandProperties.outputBlobUri = reader.getString(); + } else if ("errorBlobUri".equals(fieldName)) { + deserializedMachineRunCommandProperties.errorBlobUri = reader.getString(); + } else if ("outputBlobManagedIdentity".equals(fieldName)) { + deserializedMachineRunCommandProperties.outputBlobManagedIdentity + = RunCommandManagedIdentity.fromJson(reader); + } else if ("errorBlobManagedIdentity".equals(fieldName)) { + deserializedMachineRunCommandProperties.errorBlobManagedIdentity + = RunCommandManagedIdentity.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedMachineRunCommandProperties.provisioningState = reader.getString(); + } else if ("instanceView".equals(fieldName)) { + deserializedMachineRunCommandProperties.instanceView + = MachineRunCommandInstanceView.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineRunCommandProperties; + }); + } +} 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 new file mode 100644 index 0000000000000..8f3004fbf0309 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsGatewayProperties.java @@ -0,0 +1,93 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings Gateway properties. + */ +@Fluent +public final class SettingsGatewayProperties implements JsonSerializable { + /* + * Associated Gateway Resource Id + */ + private String gatewayResourceId; + + /** + * Creates an instance of SettingsGatewayProperties class. + */ + public SettingsGatewayProperties() { + } + + /** + * Get the gatewayResourceId property: Associated Gateway Resource Id. + * + * @return the gatewayResourceId value. + */ + public String gatewayResourceId() { + return this.gatewayResourceId; + } + + /** + * Set the gatewayResourceId property: Associated Gateway Resource Id. + * + * @param gatewayResourceId the gatewayResourceId value to set. + * @return the SettingsGatewayProperties object itself. + */ + public SettingsGatewayProperties withGatewayResourceId(String gatewayResourceId) { + this.gatewayResourceId = gatewayResourceId; + 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("gatewayResourceId", this.gatewayResourceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SettingsGatewayProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SettingsGatewayProperties 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 SettingsGatewayProperties. + */ + public static SettingsGatewayProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SettingsGatewayProperties deserializedSettingsGatewayProperties = new SettingsGatewayProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("gatewayResourceId".equals(fieldName)) { + deserializedSettingsGatewayProperties.gatewayResourceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedSettingsGatewayProperties; + }); + } +} 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 new file mode 100644 index 0000000000000..c49b5590bc493 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsInner.java @@ -0,0 +1,186 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Settings model. + */ +@Fluent +public final class SettingsInner extends ProxyResource { + /* + * Settings properties + */ + private SettingsProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SettingsInner class. + */ + public SettingsInner() { + } + + /** + * Get the innerProperties property: Settings properties. + * + * @return the innerProperties value. + */ + private SettingsProperties 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. + * + * @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; + } + + /** + * Get the tenantId property: Azure resource tenant Id. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } + + /** + * Get the gatewayResourceId property: Associated Gateway Resource Id. + * + * @return the gatewayResourceId value. + */ + public String gatewayResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().gatewayResourceId(); + } + + /** + * Set the gatewayResourceId property: Associated Gateway Resource Id. + * + * @param gatewayResourceId the gatewayResourceId value to set. + * @return the SettingsInner object itself. + */ + public SettingsInner withGatewayResourceId(String gatewayResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new SettingsProperties(); + } + this.innerProperties().withGatewayResourceId(gatewayResourceId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SettingsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SettingsInner 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 SettingsInner. + */ + public static SettingsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SettingsInner deserializedSettingsInner = new SettingsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSettingsInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSettingsInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSettingsInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSettingsInner.innerProperties = SettingsProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSettingsInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSettingsInner; + }); + } +} 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 new file mode 100644 index 0000000000000..9f55875daaeba --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/SettingsProperties.java @@ -0,0 +1,124 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Settings properties. + */ +@Fluent +public final class SettingsProperties implements JsonSerializable { + /* + * Azure resource tenant Id + */ + private String tenantId; + + /* + * Settings Gateway properties + */ + private SettingsGatewayProperties innerGatewayProperties; + + /** + * Creates an instance of SettingsProperties class. + */ + public SettingsProperties() { + } + + /** + * Get the tenantId property: Azure resource tenant Id. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the innerGatewayProperties property: Settings Gateway properties. + * + * @return the innerGatewayProperties value. + */ + private SettingsGatewayProperties innerGatewayProperties() { + return this.innerGatewayProperties; + } + + /** + * Get the gatewayResourceId property: Associated Gateway Resource Id. + * + * @return the gatewayResourceId value. + */ + public String gatewayResourceId() { + return this.innerGatewayProperties() == null ? null : this.innerGatewayProperties().gatewayResourceId(); + } + + /** + * Set the gatewayResourceId property: Associated Gateway Resource Id. + * + * @param gatewayResourceId the gatewayResourceId value to set. + * @return the SettingsProperties object itself. + */ + public SettingsProperties withGatewayResourceId(String gatewayResourceId) { + if (this.innerGatewayProperties() == null) { + this.innerGatewayProperties = new SettingsGatewayProperties(); + } + this.innerGatewayProperties().withGatewayResourceId(gatewayResourceId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerGatewayProperties() != null) { + innerGatewayProperties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("gatewayProperties", this.innerGatewayProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SettingsProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SettingsProperties 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 SettingsProperties. + */ + public static SettingsProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SettingsProperties deserializedSettingsProperties = new SettingsProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tenantId".equals(fieldName)) { + deserializedSettingsProperties.tenantId = reader.getString(); + } else if ("gatewayProperties".equals(fieldName)) { + deserializedSettingsProperties.innerGatewayProperties = SettingsGatewayProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSettingsProperties; + }); + } +} 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 new file mode 100644 index 0000000000000..118d53d6993e5 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewayImpl.java @@ -0,0 +1,211 @@ +// 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.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner; +import com.azure.resourcemanager.hybridcompute.models.Gateway; +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +import com.azure.resourcemanager.hybridcompute.models.GatewayUpdate; +import com.azure.resourcemanager.hybridcompute.models.ProvisioningState; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class GatewayImpl implements Gateway, Gateway.Definition, Gateway.Update { + private GatewayInner innerObject; + + private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String gatewayId() { + return this.innerModel().gatewayId(); + } + + public GatewayType gatewayType() { + return this.innerModel().gatewayType(); + } + + public String gatewayEndpoint() { + return this.innerModel().gatewayEndpoint(); + } + + public List allowedFeatures() { + List inner = this.innerModel().allowedFeatures(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public GatewayInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String gatewayName; + + private GatewayUpdate updateParameters; + + public GatewayImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Gateway create() { + this.innerObject = serviceManager.serviceClient() + .getGateways() + .createOrUpdate(resourceGroupName, gatewayName, this.innerModel(), Context.NONE); + return this; + } + + public Gateway create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getGateways() + .createOrUpdate(resourceGroupName, gatewayName, this.innerModel(), context); + return this; + } + + GatewayImpl(String name, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + this.innerObject = new GatewayInner(); + this.serviceManager = serviceManager; + this.gatewayName = name; + } + + public GatewayImpl update() { + this.updateParameters = new GatewayUpdate(); + return this; + } + + public Gateway apply() { + this.innerObject = serviceManager.serviceClient() + .getGateways() + .updateWithResponse(resourceGroupName, gatewayName, updateParameters, Context.NONE) + .getValue(); + return this; + } + + public Gateway apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getGateways() + .updateWithResponse(resourceGroupName, gatewayName, updateParameters, context) + .getValue(); + return this; + } + + GatewayImpl(GatewayInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.gatewayName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "gateways"); + } + + public Gateway refresh() { + this.innerObject = serviceManager.serviceClient() + .getGateways() + .getByResourceGroupWithResponse(resourceGroupName, gatewayName, Context.NONE) + .getValue(); + return this; + } + + public Gateway refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getGateways() + .getByResourceGroupWithResponse(resourceGroupName, gatewayName, context) + .getValue(); + return this; + } + + public GatewayImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public GatewayImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public GatewayImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateParameters.withTags(tags); + return this; + } + } + + public GatewayImpl withGatewayType(GatewayType gatewayType) { + this.innerModel().withGatewayType(gatewayType); + return this; + } + + public GatewayImpl withAllowedFeatures(List allowedFeatures) { + if (isInCreateMode()) { + this.innerModel().withAllowedFeatures(allowedFeatures); + return this; + } else { + this.updateParameters.withAllowedFeatures(allowedFeatures); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} 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 new file mode 100644 index 0000000000000..eb4ae1f362210 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysClientImpl.java @@ -0,0 +1,1172 @@ +// 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.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient; +import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner; +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; + +/** + * An instance of this class provides access to all the operations defined in GatewaysClient. + */ +public final class GatewaysClientImpl implements GatewaysClient { + /** + * The proxy service used to perform REST calls. + */ + private final GatewaysService service; + + /** + * The service client containing this operation class. + */ + private final HybridComputeManagementClientImpl client; + + /** + * Initializes an instance of GatewaysClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GatewaysClientImpl(HybridComputeManagementClientImpl client) { + this.service = RestProxy.create(GatewaysService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HybridComputeManagementClientGateways to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "HybridComputeManagem") + public interface GatewaysService { + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, + @BodyParam("application/json") GatewayInner parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("gatewayName") String gatewayName, + @BodyParam("application/json") GatewayUpdate parameters, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @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("gatewayName") String gatewayName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways/{gatewayName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@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); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/gateways") + @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}/providers/Microsoft.HybridCompute/gateways") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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>> createOrUpdateWithResponseAsync(String resourceGroupName, + String gatewayName, GatewayInner 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 (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, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway 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 an Arc Gateway along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String gatewayName, GatewayInner parameters, Context context) { + 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"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, gatewayName, parameters, accept, context); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, GatewayInner> beginCreateOrUpdateAsync(String resourceGroupName, + String gatewayName, GatewayInner parameters) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, gatewayName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + GatewayInner.class, GatewayInner.class, this.client.getContext()); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway 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 PollerFlux} for polling of describes an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, GatewayInner> beginCreateOrUpdateAsync(String resourceGroupName, + String gatewayName, GatewayInner parameters, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, gatewayName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + GatewayInner.class, GatewayInner.class, context); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, GatewayInner> beginCreateOrUpdate(String resourceGroupName, + String gatewayName, GatewayInner parameters) { + return this.beginCreateOrUpdateAsync(resourceGroupName, gatewayName, parameters).getSyncPoller(); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway 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 an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, GatewayInner> beginCreateOrUpdate(String resourceGroupName, + String gatewayName, GatewayInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, gatewayName, parameters, context).getSyncPoller(); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 createOrUpdateAsync(String resourceGroupName, String gatewayName, + GatewayInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, gatewayName, parameters).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway 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 an Arc Gateway on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String gatewayName, + GatewayInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, gatewayName, parameters, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 createOrUpdate(String resourceGroupName, String gatewayName, GatewayInner parameters) { + return createOrUpdateAsync(resourceGroupName, gatewayName, parameters).block(); + } + + /** + * The operation to create or update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Create gateway 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 an Arc Gateway. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public GatewayInner createOrUpdate(String resourceGroupName, String gatewayName, GatewayInner parameters, + Context context) { + return createOrUpdateAsync(resourceGroupName, gatewayName, parameters, context).block(); + } + + /** + * The operation to update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Update gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> updateWithResponseAsync(String resourceGroupName, String gatewayName, + GatewayUpdate 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 (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, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Update gateway 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 an Arc Gateway along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String gatewayName, + GatewayUpdate parameters, Context context) { + 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"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, gatewayName, parameters, accept, context); + } + + /** + * The operation to update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Update gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 updateAsync(String resourceGroupName, String gatewayName, GatewayUpdate parameters) { + return updateWithResponseAsync(resourceGroupName, gatewayName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * The operation to update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Update gateway 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 an Arc Gateway along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String gatewayName, + GatewayUpdate parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, gatewayName, parameters, context).block(); + } + + /** + * The operation to update a gateway. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param gatewayName The name of the Gateway. + * @param parameters Parameters supplied to the Update gateway operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 update(String resourceGroupName, String gatewayName, GatewayUpdate parameters) { + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + 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"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(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 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) { + return getByResourceGroupWithResponseAsync(resourceGroupName, gatewayName, context).block(); + } + + /** + * 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. + * + * @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 the {@link Response} on successful completion of {@link Mono}. + */ + @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, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to delete 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String gatewayName, + Context context) { + 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"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, gatewayName, accept, context); + } + + /** + * The operation to delete 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String gatewayName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, gatewayName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * The operation to delete 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String gatewayName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, gatewayName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * The operation to delete 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String gatewayName) { + return this.beginDeleteAsync(resourceGroupName, gatewayName).getSyncPoller(); + } + + /** + * The operation to delete 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String gatewayName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, gatewayName, context).getSyncPoller(); + } + + /** + * The operation to delete 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String gatewayName) { + return beginDeleteAsync(resourceGroupName, gatewayName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to delete 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String gatewayName, Context context) { + return beginDeleteAsync(resourceGroupName, gatewayName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to delete 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String gatewayName) { + deleteAsync(resourceGroupName, gatewayName).block(); + } + + /** + * The operation to delete 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String gatewayName, Context context) { + deleteAsync(resourceGroupName, gatewayName, context).block(); + } + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @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 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(), 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())); + } + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List license operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + 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"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @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 license operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List license operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @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 license operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List license operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * The operation to get all gateways of a non-Azure 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 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(), + 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())); + } + + /** + * The operation to get all gateways of a non-Azure 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 List license operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + 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"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * The operation to get all gateways of a non-Azure 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 the List license operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * The operation to get all gateways of a non-Azure 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 List license operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * The operation to get all gateways of a non-Azure 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 the List license operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * The operation to get all gateways of a non-Azure 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 List license operation response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the 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( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 license operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { + 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"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the 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( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 license operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { + 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"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} 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 new file mode 100644 index 0000000000000..ed0576daa4d6d --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/GatewaysImpl.java @@ -0,0 +1,146 @@ +// 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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient; +import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner; +import com.azure.resourcemanager.hybridcompute.models.Gateway; +import com.azure.resourcemanager.hybridcompute.models.Gateways; + +public final class GatewaysImpl implements Gateways { + private static final ClientLogger LOGGER = new ClientLogger(GatewaysImpl.class); + + private final GatewaysClient innerClient; + + private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; + + public GatewaysImpl(GatewaysClient innerClient, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String gatewayName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, gatewayName, context); + 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) { + GatewayInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, gatewayName); + if (inner != null) { + return new GatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String gatewayName) { + this.serviceClient().delete(resourceGroupName, gatewayName); + } + + public void delete(String resourceGroupName, String gatewayName, Context context) { + this.serviceClient().delete(resourceGroupName, gatewayName, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GatewayImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GatewayImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GatewayImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new GatewayImpl(inner1, this.manager())); + } + + public Gateway 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 gatewayName = ResourceManagerUtils.getValueFromIdByName(id, "gateways"); + if (gatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, gatewayName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String gatewayName = ResourceManagerUtils.getValueFromIdByName(id, "gateways"); + if (gatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, gatewayName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String gatewayName = ResourceManagerUtils.getValueFromIdByName(id, "gateways"); + if (gatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id))); + } + this.delete(resourceGroupName, gatewayName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String gatewayName = ResourceManagerUtils.getValueFromIdByName(id, "gateways"); + if (gatewayName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id))); + } + this.delete(resourceGroupName, gatewayName, context); + } + + private GatewaysClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { + return this.serviceManager; + } + + public GatewayImpl define(String name) { + return new GatewayImpl(name, this.manager()); + } +} 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 aeae6ef286152..df91026b5d993 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 @@ -24,10 +24,12 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadatasClient; +import com.azure.resourcemanager.hybridcompute.fluent.GatewaysClient; import com.azure.resourcemanager.hybridcompute.fluent.HybridComputeManagementClient; import com.azure.resourcemanager.hybridcompute.fluent.LicenseProfilesClient; import com.azure.resourcemanager.hybridcompute.fluent.LicensesClient; import com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient; +import com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient; import com.azure.resourcemanager.hybridcompute.fluent.MachinesClient; import com.azure.resourcemanager.hybridcompute.fluent.NetworkProfilesClient; import com.azure.resourcemanager.hybridcompute.fluent.NetworkSecurityPerimeterConfigurationsClient; @@ -36,6 +38,7 @@ import com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.hybridcompute.fluent.PrivateLinkScopesClient; import com.azure.resourcemanager.hybridcompute.fluent.ResourceProvidersClient; +import com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -246,6 +249,48 @@ public NetworkProfilesClient getNetworkProfiles() { return this.networkProfiles; } + /** + * The MachineRunCommandsClient object to access its operations. + */ + private final MachineRunCommandsClient machineRunCommands; + + /** + * Gets the MachineRunCommandsClient object to access its operations. + * + * @return the MachineRunCommandsClient object. + */ + public MachineRunCommandsClient getMachineRunCommands() { + return this.machineRunCommands; + } + + /** + * The GatewaysClient object to access its operations. + */ + private final GatewaysClient gateways; + + /** + * Gets the GatewaysClient object to access its operations. + * + * @return the GatewaysClient object. + */ + public GatewaysClient getGateways() { + return this.gateways; + } + + /** + * The SettingsOperationsClient object to access its operations. + */ + private final SettingsOperationsClient settingsOperations; + + /** + * Gets the SettingsOperationsClient object to access its operations. + * + * @return the SettingsOperationsClient object. + */ + public SettingsOperationsClient getSettingsOperations() { + return this.settingsOperations; + } + /** * The PrivateLinkScopesClient object to access its operations. */ @@ -319,7 +364,7 @@ public NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterC this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-07-10"; + this.apiVersion = "2024-07-31-preview"; this.licenses = new LicensesClientImpl(this); this.machines = new MachinesClientImpl(this); this.licenseProfiles = new LicenseProfilesClientImpl(this); @@ -328,6 +373,9 @@ public NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterC this.extensionMetadatas = new ExtensionMetadatasClientImpl(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); 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 ab6d7b65135bc..5eabafede1c3a 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 @@ -388,7 +388,7 @@ public MachineExtensionInner createOrUpdate(String resourceGroupName, String mac } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -435,7 +435,7 @@ private Mono>> updateWithResponseAsync(String resource } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -481,7 +481,7 @@ private Mono>> updateWithResponseAsync(String resource } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -504,7 +504,7 @@ private PollerFlux, MachineExtensionInner> beg } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -528,7 +528,7 @@ private PollerFlux, MachineExtensionInner> beg } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -547,7 +547,7 @@ public SyncPoller, MachineExtensionInner> begi } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -567,7 +567,7 @@ public SyncPoller, MachineExtensionInner> begi } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -586,7 +586,7 @@ private Mono updateAsync(String resourceGroupName, String } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -606,7 +606,7 @@ private Mono updateAsync(String resourceGroupName, String } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. @@ -624,7 +624,7 @@ public MachineExtensionInner update(String resourceGroupName, String machineName } /** - * The operation to update the extension. + * 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 machine where the extension should be created or updated. 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 34f87c0cbc3bc..b5b8748d45fb5 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 @@ -14,6 +14,8 @@ import com.azure.resourcemanager.hybridcompute.models.AgentUpgrade; import com.azure.resourcemanager.hybridcompute.models.ArcKindEnum; import com.azure.resourcemanager.hybridcompute.models.CloudMetadata; +import com.azure.resourcemanager.hybridcompute.models.FirmwareProfile; +import com.azure.resourcemanager.hybridcompute.models.HardwareProfile; import com.azure.resourcemanager.hybridcompute.models.Identity; import com.azure.resourcemanager.hybridcompute.models.LicenseProfileMachineInstanceView; import com.azure.resourcemanager.hybridcompute.models.LocationData; @@ -24,6 +26,7 @@ import com.azure.resourcemanager.hybridcompute.models.OSProfile; import com.azure.resourcemanager.hybridcompute.models.ServiceStatuses; import com.azure.resourcemanager.hybridcompute.models.StatusTypes; +import com.azure.resourcemanager.hybridcompute.models.StorageProfile; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; @@ -101,6 +104,18 @@ public ServiceStatuses serviceStatuses() { return this.innerModel().serviceStatuses(); } + public HardwareProfile hardwareProfile() { + return this.innerModel().hardwareProfile(); + } + + public StorageProfile storageProfile() { + return this.innerModel().storageProfile(); + } + + public FirmwareProfile firmwareProfile() { + return this.innerModel().firmwareProfile(); + } + public CloudMetadata cloudMetadata() { return this.innerModel().cloudMetadata(); } 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 3eb303c8cfcc3..cc03883c1051f 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 @@ -11,6 +11,8 @@ import com.azure.resourcemanager.hybridcompute.models.AgentConfiguration; import com.azure.resourcemanager.hybridcompute.models.AgentUpgrade; import com.azure.resourcemanager.hybridcompute.models.CloudMetadata; +import com.azure.resourcemanager.hybridcompute.models.FirmwareProfile; +import com.azure.resourcemanager.hybridcompute.models.HardwareProfile; import com.azure.resourcemanager.hybridcompute.models.LicenseProfileMachineInstanceView; import com.azure.resourcemanager.hybridcompute.models.LocationData; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceView; @@ -19,6 +21,7 @@ import com.azure.resourcemanager.hybridcompute.models.OSProfile; import com.azure.resourcemanager.hybridcompute.models.ServiceStatuses; import com.azure.resourcemanager.hybridcompute.models.StatusTypes; +import com.azure.resourcemanager.hybridcompute.models.StorageProfile; import java.time.OffsetDateTime; import java.util.Collections; import java.util.List; @@ -48,6 +51,18 @@ public ServiceStatuses serviceStatuses() { return this.innerModel().serviceStatuses(); } + public HardwareProfile hardwareProfile() { + return this.innerModel().hardwareProfile(); + } + + public StorageProfile storageProfile() { + return this.innerModel().storageProfile(); + } + + public FirmwareProfile firmwareProfile() { + return this.innerModel().firmwareProfile(); + } + public CloudMetadata cloudMetadata() { return this.innerModel().cloudMetadata(); } 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 new file mode 100644 index 0000000000000..0b5386c5d7c0a --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandImpl.java @@ -0,0 +1,281 @@ +// 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.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommand; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandInstanceView; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandScriptSource; +import com.azure.resourcemanager.hybridcompute.models.RunCommandInputParameter; +import com.azure.resourcemanager.hybridcompute.models.RunCommandManagedIdentity; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class MachineRunCommandImpl + implements MachineRunCommand, MachineRunCommand.Definition, MachineRunCommand.Update { + private MachineRunCommandInner innerObject; + + private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public MachineRunCommandScriptSource source() { + return this.innerModel().source(); + } + + public List parameters() { + List inner = this.innerModel().parameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List protectedParameters() { + List inner = this.innerModel().protectedParameters(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean asyncExecution() { + return this.innerModel().asyncExecution(); + } + + public String runAsUser() { + return this.innerModel().runAsUser(); + } + + public String runAsPassword() { + return this.innerModel().runAsPassword(); + } + + public Integer timeoutInSeconds() { + return this.innerModel().timeoutInSeconds(); + } + + public String outputBlobUri() { + return this.innerModel().outputBlobUri(); + } + + public String errorBlobUri() { + return this.innerModel().errorBlobUri(); + } + + public RunCommandManagedIdentity outputBlobManagedIdentity() { + return this.innerModel().outputBlobManagedIdentity(); + } + + public RunCommandManagedIdentity errorBlobManagedIdentity() { + return this.innerModel().errorBlobManagedIdentity(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public MachineRunCommandInstanceView instanceView() { + return this.innerModel().instanceView(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public MachineRunCommandInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String machineName; + + private String runCommandName; + + public MachineRunCommandImpl withExistingMachine(String resourceGroupName, String machineName) { + this.resourceGroupName = resourceGroupName; + this.machineName = machineName; + return this; + } + + public MachineRunCommand create() { + this.innerObject = serviceManager.serviceClient() + .getMachineRunCommands() + .createOrUpdate(resourceGroupName, machineName, runCommandName, this.innerModel(), Context.NONE); + return this; + } + + public MachineRunCommand create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMachineRunCommands() + .createOrUpdate(resourceGroupName, machineName, runCommandName, this.innerModel(), context); + return this; + } + + MachineRunCommandImpl(String name, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + this.innerObject = new MachineRunCommandInner(); + this.serviceManager = serviceManager; + this.runCommandName = name; + } + + public MachineRunCommandImpl update() { + return this; + } + + public MachineRunCommand apply() { + this.innerObject = serviceManager.serviceClient() + .getMachineRunCommands() + .createOrUpdate(resourceGroupName, machineName, runCommandName, this.innerModel(), Context.NONE); + return this; + } + + public MachineRunCommand apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMachineRunCommands() + .createOrUpdate(resourceGroupName, machineName, runCommandName, this.innerModel(), context); + return this; + } + + MachineRunCommandImpl(MachineRunCommandInner 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"); + this.runCommandName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "runCommands"); + } + + public MachineRunCommand refresh() { + this.innerObject = serviceManager.serviceClient() + .getMachineRunCommands() + .getWithResponse(resourceGroupName, machineName, runCommandName, Context.NONE) + .getValue(); + return this; + } + + public MachineRunCommand refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getMachineRunCommands() + .getWithResponse(resourceGroupName, machineName, runCommandName, context) + .getValue(); + return this; + } + + public MachineRunCommandImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public MachineRunCommandImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public MachineRunCommandImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public MachineRunCommandImpl withSource(MachineRunCommandScriptSource source) { + this.innerModel().withSource(source); + return this; + } + + public MachineRunCommandImpl withParameters(List parameters) { + this.innerModel().withParameters(parameters); + return this; + } + + public MachineRunCommandImpl withProtectedParameters(List protectedParameters) { + this.innerModel().withProtectedParameters(protectedParameters); + return this; + } + + public MachineRunCommandImpl withAsyncExecution(Boolean asyncExecution) { + this.innerModel().withAsyncExecution(asyncExecution); + return this; + } + + public MachineRunCommandImpl withRunAsUser(String runAsUser) { + this.innerModel().withRunAsUser(runAsUser); + return this; + } + + public MachineRunCommandImpl withRunAsPassword(String runAsPassword) { + this.innerModel().withRunAsPassword(runAsPassword); + return this; + } + + public MachineRunCommandImpl withTimeoutInSeconds(Integer timeoutInSeconds) { + this.innerModel().withTimeoutInSeconds(timeoutInSeconds); + return this; + } + + public MachineRunCommandImpl withOutputBlobUri(String outputBlobUri) { + this.innerModel().withOutputBlobUri(outputBlobUri); + return this; + } + + public MachineRunCommandImpl withErrorBlobUri(String errorBlobUri) { + this.innerModel().withErrorBlobUri(errorBlobUri); + return this; + } + + public MachineRunCommandImpl withOutputBlobManagedIdentity(RunCommandManagedIdentity outputBlobManagedIdentity) { + this.innerModel().withOutputBlobManagedIdentity(outputBlobManagedIdentity); + return this; + } + + public MachineRunCommandImpl withErrorBlobManagedIdentity(RunCommandManagedIdentity errorBlobManagedIdentity) { + this.innerModel().withErrorBlobManagedIdentity(errorBlobManagedIdentity); + return this; + } +} 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 new file mode 100644 index 0000000000000..0db1ab381d0f2 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsClientImpl.java @@ -0,0 +1,948 @@ +// 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.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient; +import com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandsListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in MachineRunCommandsClient. + */ +public final class MachineRunCommandsClientImpl implements MachineRunCommandsClient { + /** + * The proxy service used to perform REST calls. + */ + private final MachineRunCommandsService service; + + /** + * The service client containing this operation class. + */ + private final HybridComputeManagementClientImpl client; + + /** + * Initializes an instance of MachineRunCommandsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + MachineRunCommandsClientImpl(HybridComputeManagementClientImpl client) { + this.service = RestProxy.create(MachineRunCommandsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HybridComputeManagementClientMachineRunCommands to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "HybridComputeManagem") + public interface MachineRunCommandsService { + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@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, + @BodyParam("application/json") MachineRunCommandInner runCommandProperties, + @HeaderParam("Accept") String accept, Context context); + + @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("$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, @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("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @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("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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>> createOrUpdateWithResponseAsync(String resourceGroupName, + String machineName, String runCommandName, MachineRunCommandInner runCommandProperties) { + 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(), resourceGroupName, machineName, + runCommandName, this.client.getApiVersion(), this.client.getSubscriptionId(), runCommandProperties, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String machineName, String runCommandName, MachineRunCommandInner runCommandProperties, Context context) { + 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"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, machineName, runCommandName, + this.client.getApiVersion(), this.client.getSubscriptionId(), runCommandProperties, accept, context); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 the {@link PollerFlux} for polling of describes a Run Command. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MachineRunCommandInner> beginCreateOrUpdateAsync( + String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, machineName, runCommandName, runCommandProperties); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineRunCommandInner.class, MachineRunCommandInner.class, + this.client.getContext()); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 the {@link PollerFlux} for polling of describes a Run Command. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MachineRunCommandInner> beginCreateOrUpdateAsync( + String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, machineName, + runCommandName, runCommandProperties, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineRunCommandInner.class, MachineRunCommandInner.class, context); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 the {@link SyncPoller} for polling of describes a Run Command. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MachineRunCommandInner> beginCreateOrUpdate( + String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties) { + return this.beginCreateOrUpdateAsync(resourceGroupName, machineName, runCommandName, runCommandProperties) + .getSyncPoller(); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 the {@link SyncPoller} for polling of describes a Run Command. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MachineRunCommandInner> beginCreateOrUpdate( + String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, machineName, runCommandName, runCommandProperties, context) + .getSyncPoller(); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 createOrUpdateAsync(String resourceGroupName, String machineName, + String runCommandName, MachineRunCommandInner runCommandProperties) { + return beginCreateOrUpdateAsync(resourceGroupName, machineName, runCommandName, runCommandProperties).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String machineName, + String runCommandName, MachineRunCommandInner runCommandProperties, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, machineName, runCommandName, runCommandProperties, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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 createOrUpdate(String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties) { + return createOrUpdateAsync(resourceGroupName, machineName, runCommandName, runCommandProperties).block(); + } + + /** + * The operation to create or update 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 runCommandProperties Parameters supplied to the Create 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MachineRunCommandInner createOrUpdate(String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties, Context context) { + return createOrUpdateAsync(resourceGroupName, machineName, runCommandName, runCommandProperties, context) + .block(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String 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(), resourceGroupName, machineName, + runCommandName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String machineName, + String runCommandName, Context context) { + 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"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), resourceGroupName, machineName, runCommandName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String machineName, + String runCommandName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, machineName, runCommandName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String machineName, + String runCommandName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, machineName, runCommandName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, + String runCommandName) { + return this.beginDeleteAsync(resourceGroupName, machineName, runCommandName).getSyncPoller(); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, + String runCommandName, Context context) { + return this.beginDeleteAsync(resourceGroupName, machineName, runCommandName, context).getSyncPoller(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String machineName, String runCommandName) { + return beginDeleteAsync(resourceGroupName, machineName, runCommandName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String machineName, String runCommandName, + Context context) { + return beginDeleteAsync(resourceGroupName, machineName, runCommandName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String machineName, String runCommandName) { + deleteAsync(resourceGroupName, machineName, runCommandName).block(); + } + + /** + * 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String machineName, String runCommandName, Context context) { + deleteAsync(resourceGroupName, machineName, runCommandName, context).block(); + } + + /** + * 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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, Context context) { + 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"; + context = this.client.mergeContext(context); + return service.get(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 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) { + return getWithResponseAsync(resourceGroupName, machineName, runCommandName, context).block(); + } + + /** + * 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. + * + * @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 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(), 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())); + } + + /** + * The operation to get all the run commands 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 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 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, Context context) { + 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"; + context = this.client.mergeContext(context); + return 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)); + } + + /** + * The operation to get all the run commands 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 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 the Run Commands List Result as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String machineName, String expand) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, machineName, expand), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * The operation to get all the run commands 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 the Run Commands List Result as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String machineName) { + final String expand = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, machineName, expand), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * The operation to get all the run commands 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 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 the Run Commands List Result as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String machineName, String expand, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, machineName, expand, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * The operation to get all the run commands 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 the Run Commands List Result as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String machineName) { + final String expand = null; + return new PagedIterable<>(listAsync(resourceGroupName, machineName, expand)); + } + + /** + * The operation to get all the run commands 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 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 the Run Commands List Result as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String machineName, String expand, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, machineName, expand, 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 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(), + 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 the Run Commands List Result along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + 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"; + context = this.client.mergeContext(context); + return 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)); + } +} 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 new file mode 100644 index 0000000000000..2921e1640a0c6 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsImpl.java @@ -0,0 +1,158 @@ +// 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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.hybridcompute.fluent.MachineRunCommandsClient; +import com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommand; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommands; + +public final class MachineRunCommandsImpl implements MachineRunCommands { + private static final ClientLogger LOGGER = new ClientLogger(MachineRunCommandsImpl.class); + + private final MachineRunCommandsClient innerClient; + + private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; + + public MachineRunCommandsImpl(MachineRunCommandsClient innerClient, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + this.innerClient = 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); + 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) { + MachineRunCommandInner inner = this.serviceClient().get(resourceGroupName, machineName, runCommandName); + if (inner != null) { + return new MachineRunCommandImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String machineName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, machineName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineRunCommandImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String machineName, String expand, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, machineName, expand, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineRunCommandImpl(inner1, this.manager())); + } + + public MachineRunCommand 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))); + } + String runCommandName = ResourceManagerUtils.getValueFromIdByName(id, "runCommands"); + if (runCommandName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'runCommands'.", id))); + } + return this.getWithResponse(resourceGroupName, machineName, runCommandName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String 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))); + } + String runCommandName = ResourceManagerUtils.getValueFromIdByName(id, "runCommands"); + if (runCommandName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'runCommands'.", id))); + } + return this.getWithResponse(resourceGroupName, machineName, runCommandName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String 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))); + } + String runCommandName = ResourceManagerUtils.getValueFromIdByName(id, "runCommands"); + if (runCommandName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'runCommands'.", id))); + } + this.delete(resourceGroupName, machineName, runCommandName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String 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))); + } + String runCommandName = ResourceManagerUtils.getValueFromIdByName(id, "runCommands"); + if (runCommandName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'runCommands'.", id))); + } + this.delete(resourceGroupName, machineName, runCommandName, context); + } + + private MachineRunCommandsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { + return this.serviceManager; + } + + public MachineRunCommandImpl define(String name) { + return new MachineRunCommandImpl(name, this.manager()); + } +} 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 new file mode 100644 index 0000000000000..cd9cab46394a2 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsImpl.java @@ -0,0 +1,53 @@ +// 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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; +import com.azure.resourcemanager.hybridcompute.models.Settings; + +public final class SettingsImpl implements Settings { + private SettingsInner innerObject; + + private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; + + SettingsImpl(SettingsInner innerObject, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String tenantId() { + return this.innerModel().tenantId(); + } + + public String gatewayResourceId() { + return this.innerModel().gatewayResourceId(); + } + + public SettingsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { + return this.serviceManager; + } +} 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 new file mode 100644 index 0000000000000..d07350a862241 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsClientImpl.java @@ -0,0 +1,623 @@ +// 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.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient; +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in SettingsOperationsClient. + */ +public final class SettingsOperationsClientImpl implements SettingsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final SettingsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final HybridComputeManagementClientImpl client; + + /** + * Initializes an instance of SettingsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + SettingsOperationsClientImpl(HybridComputeManagementClientImpl client) { + this.service = RestProxy.create(SettingsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HybridComputeManagementClientSettingsOperations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "HybridComputeManagem") + 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("$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("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("$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, + @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("$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, + @BodyParam("application/json") SettingsInner parameters, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Returns the base Settings for the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings 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} 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(), + this.client.getSubscriptionId(), resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Returns the base Settings for the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings 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 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, Context context) { + 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"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, accept, context); + } + + /** + * Returns the base Settings for the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName) { + return getWithResponseAsync(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns the base Settings for the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings 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 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) { + return getWithResponseAsync(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, context).block(); + } + + /** + * Returns the base Settings for the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SettingsInner get(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName) { + return getWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, Context.NONE).getValue(); + } + + /** + * Updates the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String baseProvider, + String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner 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 (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, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String baseProvider, + String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters, + Context context) { + 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"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, parameters, + accept, context); + } + + /** + * Updates the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 updateAsync(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters) { + return updateWithResponseAsync(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + public Response updateWithResponse(String resourceGroupName, String baseProvider, + String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters, + Context context) { + return updateWithResponseAsync(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, parameters, context).block(); + } + + /** + * Updates the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 SettingsInner update(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters) { + return updateWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, parameters, Context.NONE).getValue(); + } + + /** + * Update the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync(String resourceGroupName, String baseProvider, + String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner 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 (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, parameters, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> patchWithResponseAsync(String resourceGroupName, String baseProvider, + String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters, + Context context) { + 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"; + context = this.client.mergeContext(context); + return service.patch(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, parameters, + accept, context); + } + + /** + * Update the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 patchAsync(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters) { + return patchWithResponseAsync(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) + public Response patchWithResponse(String resourceGroupName, String baseProvider, + String baseResourceType, String baseResourceName, String settingsResourceName, SettingsInner parameters, + Context context) { + return patchWithResponseAsync(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, parameters, context).block(); + } + + /** + * Update the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 SettingsInner patch(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters) { + return patchWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, parameters, Context.NONE).getValue(); + } +} 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 new file mode 100644 index 0000000000000..b663f67428d25 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/SettingsOperationsImpl.java @@ -0,0 +1,110 @@ +// 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.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.hybridcompute.fluent.SettingsOperationsClient; +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; +import com.azure.resourcemanager.hybridcompute.models.Settings; +import com.azure.resourcemanager.hybridcompute.models.SettingsOperations; + +public final class SettingsOperationsImpl implements SettingsOperations { + private static final ClientLogger LOGGER = new ClientLogger(SettingsOperationsImpl.class); + + private final SettingsOperationsClient innerClient; + + private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; + + public SettingsOperationsImpl(SettingsOperationsClient innerClient, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, + context); + 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, + String settingsResourceName) { + SettingsInner inner = this.serviceClient() + .get(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName); + if (inner != null) { + return new SettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context) { + Response inner = this.serviceClient() + .updateWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, parameters, context); + 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, + String baseResourceName, String settingsResourceName, SettingsInner parameters) { + SettingsInner inner = this.serviceClient() + .update(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, + parameters); + if (inner != null) { + return new SettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response patchWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context) { + Response inner = this.serviceClient() + .patchWithResponse(resourceGroupName, baseProvider, baseResourceType, baseResourceName, + settingsResourceName, parameters, context); + 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, + String baseResourceName, String settingsResourceName, SettingsInner parameters) { + SettingsInner inner = this.serviceClient() + .patch(resourceGroupName, baseProvider, baseResourceType, baseResourceName, settingsResourceName, + parameters); + if (inner != null) { + return new SettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + private SettingsOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { + return this.serviceManager; + } +} 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 ecd02889eb629..24509dc5d74c0 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 @@ -26,12 +26,12 @@ public final class AgentUpgrade implements JsonSerializable { private String desiredVersion; /* - * The correlation ID passed in from RSM per upgrade. + * The correlation ID associated with an agent upgrade operation. */ private UUID correlationId; /* - * Specifies if RSM should try to upgrade this machine + * Specifies if the machine's agent should be upgraded */ private Boolean enableAutomaticUpgrade; @@ -82,7 +82,7 @@ public AgentUpgrade withDesiredVersion(String desiredVersion) { } /** - * Get the correlationId property: The correlation ID passed in from RSM per upgrade. + * Get the correlationId property: The correlation ID associated with an agent upgrade operation. * * @return the correlationId value. */ @@ -91,7 +91,7 @@ public UUID correlationId() { } /** - * Set the correlationId property: The correlation ID passed in from RSM per upgrade. + * Set the correlationId property: The correlation ID associated with an agent upgrade operation. * * @param correlationId the correlationId value to set. * @return the AgentUpgrade object itself. @@ -102,7 +102,7 @@ public AgentUpgrade withCorrelationId(UUID correlationId) { } /** - * Get the enableAutomaticUpgrade property: Specifies if RSM should try to upgrade this machine. + * Get the enableAutomaticUpgrade property: Specifies if the machine's agent should be upgraded. * * @return the enableAutomaticUpgrade value. */ @@ -111,7 +111,7 @@ public Boolean enableAutomaticUpgrade() { } /** - * Set the enableAutomaticUpgrade property: Specifies if RSM should try to upgrade this machine. + * Set the enableAutomaticUpgrade property: Specifies if the machine's agent should be upgraded. * * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. * @return the AgentUpgrade object itself. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Disk.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Disk.java new file mode 100644 index 0000000000000..93b49b061b720 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Disk.java @@ -0,0 +1,261 @@ +// 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.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes a disk on the machine. + */ +@Fluent +public final class Disk implements JsonSerializable { + /* + * The path of the disk. + */ + private String path; + + /* + * The type of the disk. + */ + private String diskType; + + /* + * The generated ID of the disk. + */ + private String generatedId; + + /* + * The ID of the disk. + */ + private String id; + + /* + * The name of the disk. + */ + private String name; + + /* + * The size of the disk, in bytes + */ + private Long maxSizeInBytes; + + /* + * The amount of space used on the disk, in bytes + */ + private Long usedSpaceInBytes; + + /** + * Creates an instance of Disk class. + */ + public Disk() { + } + + /** + * Get the path property: The path of the disk. + * + * @return the path value. + */ + 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. + * + * @return the diskType value. + */ + 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. + * + * @return the generatedId value. + */ + 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. + * + * @return the id value. + */ + 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. + * + * @return the name value. + */ + 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. + * + * @return the maxSizeInBytes value. + */ + 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. + * + * @return the usedSpaceInBytes value. + */ + 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("path", this.path); + jsonWriter.writeStringField("diskType", this.diskType); + jsonWriter.writeStringField("generatedId", this.generatedId); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("maxSizeInBytes", this.maxSizeInBytes); + jsonWriter.writeNumberField("usedSpaceInBytes", this.usedSpaceInBytes); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Disk from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Disk 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 Disk. + */ + public static Disk fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Disk deserializedDisk = new Disk(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("path".equals(fieldName)) { + deserializedDisk.path = reader.getString(); + } else if ("diskType".equals(fieldName)) { + deserializedDisk.diskType = reader.getString(); + } else if ("generatedId".equals(fieldName)) { + deserializedDisk.generatedId = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedDisk.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedDisk.name = reader.getString(); + } else if ("maxSizeInBytes".equals(fieldName)) { + deserializedDisk.maxSizeInBytes = reader.getNullable(JsonReader::getLong); + } else if ("usedSpaceInBytes".equals(fieldName)) { + deserializedDisk.usedSpaceInBytes = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedDisk; + }); + } +} 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 new file mode 100644 index 0000000000000..cc9467c9d1ff1 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExecutionState.java @@ -0,0 +1,76 @@ +// 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.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Script execution status. + */ +public final class ExecutionState extends ExpandableStringEnum { + /** + * Static value Unknown for ExecutionState. + */ + public static final ExecutionState UNKNOWN = fromString("Unknown"); + + /** + * Static value Pending for ExecutionState. + */ + public static final ExecutionState PENDING = fromString("Pending"); + + /** + * Static value Running for ExecutionState. + */ + public static final ExecutionState RUNNING = fromString("Running"); + + /** + * Static value Failed for ExecutionState. + */ + public static final ExecutionState FAILED = fromString("Failed"); + + /** + * Static value Succeeded for ExecutionState. + */ + public static final ExecutionState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value TimedOut for ExecutionState. + */ + public static final ExecutionState TIMED_OUT = fromString("TimedOut"); + + /** + * Static value Canceled for ExecutionState. + */ + public static final ExecutionState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ExecutionState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExecutionState() { + } + + /** + * Creates or finds a ExecutionState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExecutionState. + */ + public static ExecutionState fromString(String name) { + return fromString(name, ExecutionState.class); + } + + /** + * Gets known ExecutionState values. + * + * @return known ExecutionState values. + */ + public static Collection values() { + return values(ExecutionState.class); + } +} 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 new file mode 100644 index 0000000000000..d1e59a9b2a51c --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsResourceStatus.java @@ -0,0 +1,211 @@ +// 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.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Instance view status. + */ +@Fluent +public final class ExtensionsResourceStatus implements JsonSerializable { + /* + * The status code. + */ + private String code; + + /* + * The level code. + */ + private ExtensionsStatusLevelTypes level; + + /* + * The short localizable label for the status. + */ + private String displayStatus; + + /* + * The detailed status message, including for alerts and error messages. + */ + private String message; + + /* + * The time of the status. + */ + private OffsetDateTime time; + + /** + * Creates an instance of ExtensionsResourceStatus class. + */ + public ExtensionsResourceStatus() { + } + + /** + * Get the code property: The status code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: The status code. + * + * @param code the code value to set. + * @return the ExtensionsResourceStatus object itself. + */ + public ExtensionsResourceStatus withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the level property: The level code. + * + * @return the level value. + */ + public ExtensionsStatusLevelTypes level() { + return this.level; + } + + /** + * Set the level property: The level code. + * + * @param level the level value to set. + * @return the ExtensionsResourceStatus object itself. + */ + public ExtensionsResourceStatus withLevel(ExtensionsStatusLevelTypes level) { + this.level = level; + return this; + } + + /** + * Get the displayStatus property: The short localizable label for the status. + * + * @return the displayStatus value. + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Set the displayStatus property: The short localizable label for the status. + * + * @param displayStatus the displayStatus value to set. + * @return the ExtensionsResourceStatus object itself. + */ + public ExtensionsResourceStatus withDisplayStatus(String displayStatus) { + this.displayStatus = displayStatus; + return this; + } + + /** + * Get the message property: The detailed status message, including for alerts and error messages. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The detailed status message, including for alerts and error messages. + * + * @param message the message value to set. + * @return the ExtensionsResourceStatus object itself. + */ + public ExtensionsResourceStatus withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the time property: The time of the status. + * + * @return the time value. + */ + public OffsetDateTime time() { + return this.time; + } + + /** + * Set the time property: The time of the status. + * + * @param time the time value to set. + * @return the ExtensionsResourceStatus object itself. + */ + public ExtensionsResourceStatus withTime(OffsetDateTime time) { + this.time = time; + 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("code", this.code); + jsonWriter.writeStringField("level", this.level == null ? null : this.level.toString()); + jsonWriter.writeStringField("displayStatus", this.displayStatus); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("time", + this.time == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.time)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ExtensionsResourceStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ExtensionsResourceStatus 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 ExtensionsResourceStatus. + */ + public static ExtensionsResourceStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ExtensionsResourceStatus deserializedExtensionsResourceStatus = new ExtensionsResourceStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("code".equals(fieldName)) { + deserializedExtensionsResourceStatus.code = reader.getString(); + } else if ("level".equals(fieldName)) { + deserializedExtensionsResourceStatus.level + = ExtensionsStatusLevelTypes.fromString(reader.getString()); + } else if ("displayStatus".equals(fieldName)) { + deserializedExtensionsResourceStatus.displayStatus = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedExtensionsResourceStatus.message = reader.getString(); + } else if ("time".equals(fieldName)) { + deserializedExtensionsResourceStatus.time = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedExtensionsResourceStatus; + }); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsStatusLevelTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsStatusLevelTypes.java new file mode 100644 index 0000000000000..854b44cfe2fcf --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsStatusLevelTypes.java @@ -0,0 +1,61 @@ +// 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; + +/** + * The level code. + */ +public enum ExtensionsStatusLevelTypes { + /** + * Enum value Info. + */ + INFO("Info"), + + /** + * Enum value Warning. + */ + WARNING("Warning"), + + /** + * Enum value Error. + */ + ERROR("Error"); + + /** + * The actual serialized value for a ExtensionsStatusLevelTypes instance. + */ + private final String value; + + ExtensionsStatusLevelTypes(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ExtensionsStatusLevelTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed ExtensionsStatusLevelTypes object, or null if unable to parse. + */ + public static ExtensionsStatusLevelTypes fromString(String value) { + if (value == null) { + return null; + } + ExtensionsStatusLevelTypes[] items = ExtensionsStatusLevelTypes.values(); + for (ExtensionsStatusLevelTypes item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/FirmwareProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/FirmwareProfile.java new file mode 100644 index 0000000000000..40686aa75e807 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/FirmwareProfile.java @@ -0,0 +1,97 @@ +// 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.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the firmware of the machine. + */ +@Immutable +public final class FirmwareProfile implements JsonSerializable { + /* + * The serial number of the firmware + */ + private String serialNumber; + + /* + * The type of the firmware + */ + private String type; + + /** + * Creates an instance of FirmwareProfile class. + */ + public FirmwareProfile() { + } + + /** + * Get the serialNumber property: The serial number of the firmware. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the type property: The type of the firmware. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * 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(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FirmwareProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FirmwareProfile 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 FirmwareProfile. + */ + public static FirmwareProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FirmwareProfile deserializedFirmwareProfile = new FirmwareProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("serialNumber".equals(fieldName)) { + deserializedFirmwareProfile.serialNumber = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedFirmwareProfile.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFirmwareProfile; + }); + } +} 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 new file mode 100644 index 0000000000000..6da5832be6e3c --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateway.java @@ -0,0 +1,310 @@ +// 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.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of Gateway. + */ +public interface Gateway { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the gatewayId property: A unique, immutable, identifier for the Gateway. + * + * @return the gatewayId value. + */ + String gatewayId(); + + /** + * Gets the gatewayType property: The type of the Gateway resource. + * + * @return the gatewayType value. + */ + GatewayType gatewayType(); + + /** + * Gets the gatewayEndpoint property: The endpoint fqdn for the Gateway. + * + * @return the gatewayEndpoint value. + */ + String gatewayEndpoint(); + + /** + * Gets the allowedFeatures property: Specifies the list of features that are enabled for this Gateway. + * + * @return the allowedFeatures value. + */ + List allowedFeatures(); + + /** + * 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.GatewayInner object. + * + * @return the inner object. + */ + GatewayInner innerModel(); + + /** + * The entirety of the Gateway definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The Gateway definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the Gateway definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the Gateway 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 Gateway 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 Gateway 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.WithGatewayType, DefinitionStages.WithAllowedFeatures { + /** + * Executes the create request. + * + * @return the created resource. + */ + Gateway create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Gateway create(Context context); + } + + /** + * The stage of the Gateway 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 Gateway definition allowing to specify gatewayType. + */ + interface WithGatewayType { + /** + * Specifies the gatewayType property: The type of the Gateway resource.. + * + * @param gatewayType The type of the Gateway resource. + * @return the next definition stage. + */ + WithCreate withGatewayType(GatewayType gatewayType); + } + + /** + * The stage of the Gateway definition allowing to specify allowedFeatures. + */ + interface WithAllowedFeatures { + /** + * Specifies the allowedFeatures property: Specifies the list of features that are enabled for this + * Gateway.. + * + * @param allowedFeatures Specifies the list of features that are enabled for this Gateway. + * @return the next definition stage. + */ + WithCreate withAllowedFeatures(List allowedFeatures); + } + } + + /** + * Begins update for the Gateway resource. + * + * @return the stage of resource update. + */ + Gateway.Update update(); + + /** + * The template for Gateway update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithAllowedFeatures { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Gateway apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Gateway apply(Context context); + } + + /** + * The Gateway update stages. + */ + interface UpdateStages { + /** + * The stage of the Gateway 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 Gateway update allowing to specify allowedFeatures. + */ + interface WithAllowedFeatures { + /** + * Specifies the allowedFeatures property: Specifies the list of features that are enabled for this + * Gateway.. + * + * @param allowedFeatures Specifies the list of features that are enabled for this Gateway. + * @return the next definition stage. + */ + Update withAllowedFeatures(List allowedFeatures); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Gateway refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Gateway refresh(Context context); +} 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 new file mode 100644 index 0000000000000..0a3a7f5c7d470 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayType.java @@ -0,0 +1,46 @@ +// 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.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The type of the Gateway resource. + */ +public final class GatewayType extends ExpandableStringEnum { + /** + * Static value Public for GatewayType. + */ + public static final GatewayType PUBLIC = fromString("Public"); + + /** + * Creates a new instance of GatewayType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public GatewayType() { + } + + /** + * Creates or finds a GatewayType from its string representation. + * + * @param name a name to look for. + * @return the corresponding GatewayType. + */ + public static GatewayType fromString(String name) { + return fromString(name, GatewayType.class); + } + + /** + * Gets known GatewayType values. + * + * @return known GatewayType values. + */ + public static Collection values() { + return values(GatewayType.class); + } +} 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 new file mode 100644 index 0000000000000..532daa0100e8c --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewayUpdate.java @@ -0,0 +1,124 @@ +// 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 com.azure.resourcemanager.hybridcompute.fluent.models.GatewayUpdateProperties; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Describes a License Update. + */ +@Fluent +public final class GatewayUpdate extends ResourceUpdate { + /* + * Gateway Update properties + */ + private GatewayUpdateProperties innerProperties; + + /** + * Creates an instance of GatewayUpdate class. + */ + public GatewayUpdate() { + } + + /** + * Get the innerProperties property: Gateway Update properties. + * + * @return the innerProperties value. + */ + private GatewayUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * {@inheritDoc} + */ + @Override + public GatewayUpdate withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the allowedFeatures property: Specifies the list of features that are enabled for this Gateway. + * + * @return the allowedFeatures value. + */ + public List allowedFeatures() { + return this.innerProperties() == null ? null : this.innerProperties().allowedFeatures(); + } + + /** + * Set the allowedFeatures property: Specifies the list of features that are enabled for this Gateway. + * + * @param allowedFeatures the allowedFeatures value to set. + * @return the GatewayUpdate object itself. + */ + public GatewayUpdate withAllowedFeatures(List allowedFeatures) { + if (this.innerProperties() == null) { + this.innerProperties = new GatewayUpdateProperties(); + } + this.innerProperties().withAllowedFeatures(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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GatewayUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GatewayUpdate 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 GatewayUpdate. + */ + public static GatewayUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GatewayUpdate deserializedGatewayUpdate = new GatewayUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedGatewayUpdate.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedGatewayUpdate.innerProperties = GatewayUpdateProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGatewayUpdate; + }); + } +} 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 new file mode 100644 index 0000000000000..6525e7fe43711 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Gateways.java @@ -0,0 +1,157 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Gateways. + */ +public interface Gateways { + /** + * 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}. + */ + 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. + */ + Gateway getByResourceGroup(String resourceGroupName, String gatewayName); + + /** + * The operation to delete 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. + */ + void deleteByResourceGroup(String resourceGroupName, String gatewayName); + + /** + * The operation to delete 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. + */ + void delete(String resourceGroupName, String gatewayName, Context context); + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @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 license operation response as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List license operation response as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * The operation to get all gateways of a non-Azure machine. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the List license operation response as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * The operation to get all gateways of a non-Azure 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 List license operation response as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Retrieves information about the view of a gateway. + * + * @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 describes an Arc Gateway along with {@link Response}. + */ + Gateway getById(String id); + + /** + * Retrieves information about the view of a gateway. + * + * @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 describes an Arc Gateway along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * The operation to delete a gateway. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * The operation to delete a gateway. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Gateway resource. + * + * @param name resource name. + * @return the first stage of the new Gateway definition. + */ + Gateway.DefinitionStages.Blank define(String name); +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewaysListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewaysListResult.java new file mode 100644 index 0000000000000..aa217fde1d680 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/GatewaysListResult.java @@ -0,0 +1,136 @@ +// 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.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner; +import java.io.IOException; +import java.util.List; + +/** + * The List license operation response. + */ +@Fluent +public final class GatewaysListResult implements JsonSerializable { + /* + * The list of Gateways. + */ + private List value; + + /* + * 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. + */ + public GatewaysListResult() { + } + + /** + * Get the value property: The list of Gateways. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * 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. + */ + 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GatewaysListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GatewaysListResult 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 GatewaysListResult. + */ + public static GatewaysListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GatewaysListResult deserializedGatewaysListResult = new GatewaysListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> GatewayInner.fromJson(reader1)); + deserializedGatewaysListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedGatewaysListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGatewaysListResult; + }); + } +} 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 new file mode 100644 index 0000000000000..d133584186ad7 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HardwareProfile.java @@ -0,0 +1,118 @@ +// 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.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes the hardware of the machine. + */ +@Immutable +public final class HardwareProfile implements JsonSerializable { + /* + * The total physical memory on the machine + */ + private Long totalPhysicalMemoryInBytes; + + /* + * The total number of CPU sockets available on the machine + */ + private Integer numberOfCpuSockets; + + /* + * The physical processors of the machine. + */ + private List processors; + + /** + * Creates an instance of HardwareProfile class. + */ + public HardwareProfile() { + } + + /** + * Get the totalPhysicalMemoryInBytes property: The total physical memory on the machine. + * + * @return the totalPhysicalMemoryInBytes value. + */ + public Long totalPhysicalMemoryInBytes() { + return this.totalPhysicalMemoryInBytes; + } + + /** + * Get the numberOfCpuSockets property: The total number of CPU sockets available on the machine. + * + * @return the numberOfCpuSockets value. + */ + public Integer numberOfCpuSockets() { + return this.numberOfCpuSockets; + } + + /** + * Get the processors property: The physical processors of the machine. + * + * @return the processors value. + */ + 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HardwareProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HardwareProfile 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 HardwareProfile. + */ + public static HardwareProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HardwareProfile deserializedHardwareProfile = new HardwareProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("totalPhysicalMemoryInBytes".equals(fieldName)) { + deserializedHardwareProfile.totalPhysicalMemoryInBytes = reader.getNullable(JsonReader::getLong); + } else if ("numberOfCpuSockets".equals(fieldName)) { + deserializedHardwareProfile.numberOfCpuSockets = reader.getNullable(JsonReader::getInt); + } else if ("processors".equals(fieldName)) { + List processors = reader.readArray(reader1 -> Processor.fromJson(reader1)); + deserializedHardwareProfile.processors = processors; + } else { + reader.skipChildren(); + } + } + + return deserializedHardwareProfile; + }); + } +} 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 4288ad7d1201d..6caf6668c6179 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 @@ -102,6 +102,27 @@ public interface Machine { */ ServiceStatuses serviceStatuses(); + /** + * Gets the hardwareProfile property: Information about the machine's hardware. + * + * @return the hardwareProfile value. + */ + HardwareProfile hardwareProfile(); + + /** + * Gets the storageProfile property: Information about the machine's storage. + * + * @return the storageProfile value. + */ + StorageProfile storageProfile(); + + /** + * Gets the firmwareProfile property: Information about the machine's firmware. + * + * @return the firmwareProfile value. + */ + FirmwareProfile firmwareProfile(); + /** * Gets the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). * 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 d8a8a5033a6f1..c6f1f288b23a7 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 @@ -37,6 +37,27 @@ public interface MachineProperties { */ ServiceStatuses serviceStatuses(); + /** + * Gets the hardwareProfile property: Information about the machine's hardware. + * + * @return the hardwareProfile value. + */ + HardwareProfile hardwareProfile(); + + /** + * Gets the storageProfile property: Information about the machine's storage. + * + * @return the storageProfile value. + */ + StorageProfile storageProfile(); + + /** + * Gets the firmwareProfile property: Information about the machine's firmware. + * + * @return the firmwareProfile value. + */ + FirmwareProfile firmwareProfile(); + /** * Gets the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). * 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 new file mode 100644 index 0000000000000..c0aef58885f80 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommand.java @@ -0,0 +1,690 @@ +// 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.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of MachineRunCommand. + */ +public interface MachineRunCommand { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the source property: The source of the run command script. + * + * @return the source value. + */ + MachineRunCommandScriptSource source(); + + /** + * Gets the parameters property: The parameters used by the script. + * + * @return the parameters value. + */ + List parameters(); + + /** + * Gets the protectedParameters property: The parameters used by the script. + * + * @return the protectedParameters value. + */ + List protectedParameters(); + + /** + * Gets the asyncExecution property: Optional. If set to true, provisioning will complete as soon as script starts + * and will not wait for script to complete. + * + * @return the asyncExecution value. + */ + Boolean asyncExecution(); + + /** + * Gets the runAsUser property: Specifies the user account on the machine when executing the run command. + * + * @return the runAsUser value. + */ + String runAsUser(); + + /** + * Gets the runAsPassword property: Specifies the user account password on the machine when executing the run + * command. + * + * @return the runAsPassword value. + */ + String runAsPassword(); + + /** + * Gets the timeoutInSeconds property: The timeout in seconds to execute the run command. + * + * @return the timeoutInSeconds value. + */ + Integer timeoutInSeconds(); + + /** + * Gets 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. + * + * @return the outputBlobUri value. + */ + String outputBlobUri(); + + /** + * Gets the errorBlobUri property: Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity parameter. + * + * @return the errorBlobUri value. + */ + String errorBlobUri(); + + /** + * Gets the outputBlobManagedIdentity property: 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 + * 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. + * + * @return the outputBlobManagedIdentity value. + */ + RunCommandManagedIdentity outputBlobManagedIdentity(); + + /** + * Gets the errorBlobManagedIdentity property: 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 + * 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. + * + * @return the errorBlobManagedIdentity value. + */ + RunCommandManagedIdentity errorBlobManagedIdentity(); + + /** + * Gets the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the instanceView property: The machine run command instance view. + * + * @return the instanceView value. + */ + MachineRunCommandInstanceView instanceView(); + + /** + * 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.MachineRunCommandInner object. + * + * @return the inner object. + */ + MachineRunCommandInner innerModel(); + + /** + * The entirety of the MachineRunCommand definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The MachineRunCommand definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the MachineRunCommand definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the MachineRunCommand 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. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify parent resource. + */ + 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. + * @return the next definition stage. + */ + WithCreate withExistingMachine(String resourceGroupName, String machineName); + } + + /** + * The stage of the MachineRunCommand 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.WithSource, DefinitionStages.WithParameters, + DefinitionStages.WithProtectedParameters, DefinitionStages.WithAsyncExecution, + DefinitionStages.WithRunAsUser, DefinitionStages.WithRunAsPassword, DefinitionStages.WithTimeoutInSeconds, + DefinitionStages.WithOutputBlobUri, DefinitionStages.WithErrorBlobUri, + DefinitionStages.WithOutputBlobManagedIdentity, DefinitionStages.WithErrorBlobManagedIdentity { + /** + * Executes the create request. + * + * @return the created resource. + */ + MachineRunCommand create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + MachineRunCommand create(Context context); + } + + /** + * The stage of the MachineRunCommand 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 MachineRunCommand definition allowing to specify source. + */ + interface WithSource { + /** + * Specifies the source property: The source of the run command script.. + * + * @param source The source of the run command script. + * @return the next definition stage. + */ + WithCreate withSource(MachineRunCommandScriptSource source); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify parameters. + */ + interface WithParameters { + /** + * Specifies the parameters property: The parameters used by the script.. + * + * @param parameters The parameters used by the script. + * @return the next definition stage. + */ + WithCreate withParameters(List parameters); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify protectedParameters. + */ + interface WithProtectedParameters { + /** + * Specifies the protectedParameters property: The parameters used by the script.. + * + * @param protectedParameters The parameters used by the script. + * @return the next definition stage. + */ + WithCreate withProtectedParameters(List protectedParameters); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify asyncExecution. + */ + interface WithAsyncExecution { + /** + * Specifies the asyncExecution property: Optional. If set to true, provisioning will complete as soon as + * script starts and will not wait for script to complete.. + * + * @param asyncExecution Optional. If set to true, provisioning will complete as soon as script starts and + * will not wait for script to complete. + * @return the next definition stage. + */ + WithCreate withAsyncExecution(Boolean asyncExecution); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify runAsUser. + */ + interface WithRunAsUser { + /** + * Specifies the runAsUser property: Specifies the user account on the machine when executing the run + * command.. + * + * @param runAsUser Specifies the user account on the machine when executing the run command. + * @return the next definition stage. + */ + WithCreate withRunAsUser(String runAsUser); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify runAsPassword. + */ + interface WithRunAsPassword { + /** + * Specifies the runAsPassword property: Specifies the user account password on the machine when executing + * the run command.. + * + * @param runAsPassword Specifies the user account password on the machine when executing the run command. + * @return the next definition stage. + */ + WithCreate withRunAsPassword(String runAsPassword); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify timeoutInSeconds. + */ + interface WithTimeoutInSeconds { + /** + * Specifies the timeoutInSeconds property: The timeout in seconds to execute the run command.. + * + * @param timeoutInSeconds The timeout in seconds to execute the run command. + * @return the next definition stage. + */ + WithCreate withTimeoutInSeconds(Integer timeoutInSeconds); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify outputBlobUri. + */ + 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. . + * + * @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 + * blob. Refer outputBlobManagedIdentity parameter. + * @return the next definition stage. + */ + WithCreate withOutputBlobUri(String outputBlobUri); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify errorBlobUri. + */ + interface WithErrorBlobUri { + /** + * Specifies the errorBlobUri property: Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity parameter.. + * + * @param errorBlobUri Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity parameter. + * @return the next definition stage. + */ + WithCreate withErrorBlobUri(String errorBlobUri); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify outputBlobManagedIdentity. + */ + interface WithOutputBlobManagedIdentity { + /** + * Specifies the outputBlobManagedIdentity property: 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 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 . + * + * @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 + * 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. + * @return the next definition stage. + */ + WithCreate withOutputBlobManagedIdentity(RunCommandManagedIdentity outputBlobManagedIdentity); + } + + /** + * The stage of the MachineRunCommand definition allowing to specify errorBlobManagedIdentity. + */ + interface WithErrorBlobManagedIdentity { + /** + * Specifies the errorBlobManagedIdentity property: 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 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 . + * + * @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 + * 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. + * @return the next definition stage. + */ + WithCreate withErrorBlobManagedIdentity(RunCommandManagedIdentity errorBlobManagedIdentity); + } + } + + /** + * Begins update for the MachineRunCommand resource. + * + * @return the stage of resource update. + */ + MachineRunCommand.Update update(); + + /** + * The template for MachineRunCommand update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithSource, UpdateStages.WithParameters, + UpdateStages.WithProtectedParameters, UpdateStages.WithAsyncExecution, UpdateStages.WithRunAsUser, + UpdateStages.WithRunAsPassword, UpdateStages.WithTimeoutInSeconds, UpdateStages.WithOutputBlobUri, + UpdateStages.WithErrorBlobUri, UpdateStages.WithOutputBlobManagedIdentity, + UpdateStages.WithErrorBlobManagedIdentity { + /** + * Executes the update request. + * + * @return the updated resource. + */ + MachineRunCommand apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + MachineRunCommand apply(Context context); + } + + /** + * The MachineRunCommand update stages. + */ + interface UpdateStages { + /** + * The stage of the MachineRunCommand 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 MachineRunCommand update allowing to specify source. + */ + interface WithSource { + /** + * Specifies the source property: The source of the run command script.. + * + * @param source The source of the run command script. + * @return the next definition stage. + */ + Update withSource(MachineRunCommandScriptSource source); + } + + /** + * The stage of the MachineRunCommand update allowing to specify parameters. + */ + interface WithParameters { + /** + * Specifies the parameters property: The parameters used by the script.. + * + * @param parameters The parameters used by the script. + * @return the next definition stage. + */ + Update withParameters(List parameters); + } + + /** + * The stage of the MachineRunCommand update allowing to specify protectedParameters. + */ + interface WithProtectedParameters { + /** + * Specifies the protectedParameters property: The parameters used by the script.. + * + * @param protectedParameters The parameters used by the script. + * @return the next definition stage. + */ + Update withProtectedParameters(List protectedParameters); + } + + /** + * The stage of the MachineRunCommand update allowing to specify asyncExecution. + */ + interface WithAsyncExecution { + /** + * Specifies the asyncExecution property: Optional. If set to true, provisioning will complete as soon as + * script starts and will not wait for script to complete.. + * + * @param asyncExecution Optional. If set to true, provisioning will complete as soon as script starts and + * will not wait for script to complete. + * @return the next definition stage. + */ + Update withAsyncExecution(Boolean asyncExecution); + } + + /** + * The stage of the MachineRunCommand update allowing to specify runAsUser. + */ + interface WithRunAsUser { + /** + * Specifies the runAsUser property: Specifies the user account on the machine when executing the run + * command.. + * + * @param runAsUser Specifies the user account on the machine when executing the run command. + * @return the next definition stage. + */ + Update withRunAsUser(String runAsUser); + } + + /** + * The stage of the MachineRunCommand update allowing to specify runAsPassword. + */ + interface WithRunAsPassword { + /** + * Specifies the runAsPassword property: Specifies the user account password on the machine when executing + * the run command.. + * + * @param runAsPassword Specifies the user account password on the machine when executing the run command. + * @return the next definition stage. + */ + Update withRunAsPassword(String runAsPassword); + } + + /** + * The stage of the MachineRunCommand update allowing to specify timeoutInSeconds. + */ + interface WithTimeoutInSeconds { + /** + * Specifies the timeoutInSeconds property: The timeout in seconds to execute the run command.. + * + * @param timeoutInSeconds The timeout in seconds to execute the run command. + * @return the next definition stage. + */ + Update withTimeoutInSeconds(Integer timeoutInSeconds); + } + + /** + * The stage of the MachineRunCommand update allowing to specify outputBlobUri. + */ + 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. . + * + * @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 + * blob. Refer outputBlobManagedIdentity parameter. + * @return the next definition stage. + */ + Update withOutputBlobUri(String outputBlobUri); + } + + /** + * The stage of the MachineRunCommand update allowing to specify errorBlobUri. + */ + interface WithErrorBlobUri { + /** + * Specifies the errorBlobUri property: Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity parameter.. + * + * @param errorBlobUri Specifies the Azure storage blob where script error 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 errorBlobManagedIdentity parameter. + * @return the next definition stage. + */ + Update withErrorBlobUri(String errorBlobUri); + } + + /** + * The stage of the MachineRunCommand update allowing to specify outputBlobManagedIdentity. + */ + interface WithOutputBlobManagedIdentity { + /** + * Specifies the outputBlobManagedIdentity property: 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 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 . + * + * @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 + * 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. + * @return the next definition stage. + */ + Update withOutputBlobManagedIdentity(RunCommandManagedIdentity outputBlobManagedIdentity); + } + + /** + * The stage of the MachineRunCommand update allowing to specify errorBlobManagedIdentity. + */ + interface WithErrorBlobManagedIdentity { + /** + * Specifies the errorBlobManagedIdentity property: 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 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 . + * + * @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 + * 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. + * @return the next definition stage. + */ + Update withErrorBlobManagedIdentity(RunCommandManagedIdentity errorBlobManagedIdentity); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + MachineRunCommand refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + MachineRunCommand refresh(Context context); +} 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 new file mode 100644 index 0000000000000..47430b53e41e6 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandInstanceView.java @@ -0,0 +1,305 @@ +// 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.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The instance view of a machine run command. + */ +@Fluent +public final class MachineRunCommandInstanceView implements JsonSerializable { + /* + * Script execution status. + */ + private ExecutionState executionState; + + /* + * Communicate script configuration errors or execution messages. + */ + private String executionMessage; + + /* + * Exit code returned from script execution. + */ + private Integer exitCode; + + /* + * Script output stream. + */ + private String output; + + /* + * Script error stream. + */ + private String error; + + /* + * Script start time. + */ + private OffsetDateTime startTime; + + /* + * Script end time. + */ + private OffsetDateTime endTime; + + /* + * The status information. + */ + private List statuses; + + /** + * Creates an instance of MachineRunCommandInstanceView class. + */ + public MachineRunCommandInstanceView() { + } + + /** + * Get the executionState property: Script execution status. + * + * @return the executionState value. + */ + public ExecutionState executionState() { + return this.executionState; + } + + /** + * Set the executionState property: Script execution status. + * + * @param executionState the executionState value to set. + * @return the MachineRunCommandInstanceView object itself. + */ + public MachineRunCommandInstanceView withExecutionState(ExecutionState executionState) { + this.executionState = executionState; + return this; + } + + /** + * Get the executionMessage property: Communicate script configuration errors or execution messages. + * + * @return the executionMessage value. + */ + public String executionMessage() { + return this.executionMessage; + } + + /** + * Set the executionMessage property: Communicate script configuration errors or execution messages. + * + * @param executionMessage the executionMessage value to set. + * @return the MachineRunCommandInstanceView object itself. + */ + public MachineRunCommandInstanceView withExecutionMessage(String executionMessage) { + this.executionMessage = executionMessage; + return this; + } + + /** + * Get the exitCode property: Exit code returned from script execution. + * + * @return the exitCode value. + */ + public Integer exitCode() { + return this.exitCode; + } + + /** + * Set the exitCode property: Exit code returned from script execution. + * + * @param exitCode the exitCode value to set. + * @return the MachineRunCommandInstanceView object itself. + */ + public MachineRunCommandInstanceView withExitCode(Integer exitCode) { + this.exitCode = exitCode; + return this; + } + + /** + * Get the output property: Script output stream. + * + * @return the output value. + */ + public String output() { + return this.output; + } + + /** + * Set the output property: Script output stream. + * + * @param output the output value to set. + * @return the MachineRunCommandInstanceView object itself. + */ + public MachineRunCommandInstanceView withOutput(String output) { + this.output = output; + return this; + } + + /** + * Get the error property: Script error stream. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * Set the error property: Script error stream. + * + * @param error the error value to set. + * @return the MachineRunCommandInstanceView object itself. + */ + public MachineRunCommandInstanceView withError(String error) { + this.error = error; + return this; + } + + /** + * Get the startTime property: Script start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Script start time. + * + * @param startTime the startTime value to set. + * @return the MachineRunCommandInstanceView object itself. + */ + public MachineRunCommandInstanceView withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: Script end time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: Script end time. + * + * @param endTime the endTime value to set. + * @return the MachineRunCommandInstanceView object itself. + */ + public MachineRunCommandInstanceView withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the statuses property: The status information. + * + * @return the statuses value. + */ + public List 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("executionState", + this.executionState == null ? null : this.executionState.toString()); + jsonWriter.writeStringField("executionMessage", this.executionMessage); + jsonWriter.writeNumberField("exitCode", this.exitCode); + jsonWriter.writeStringField("output", this.output); + jsonWriter.writeStringField("error", this.error); + jsonWriter.writeStringField("startTime", + this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); + jsonWriter.writeStringField("endTime", + this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); + jsonWriter.writeArrayField("statuses", this.statuses, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineRunCommandInstanceView from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineRunCommandInstanceView 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 MachineRunCommandInstanceView. + */ + public static MachineRunCommandInstanceView fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineRunCommandInstanceView deserializedMachineRunCommandInstanceView + = new MachineRunCommandInstanceView(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("executionState".equals(fieldName)) { + deserializedMachineRunCommandInstanceView.executionState + = ExecutionState.fromString(reader.getString()); + } else if ("executionMessage".equals(fieldName)) { + deserializedMachineRunCommandInstanceView.executionMessage = reader.getString(); + } else if ("exitCode".equals(fieldName)) { + deserializedMachineRunCommandInstanceView.exitCode = reader.getNullable(JsonReader::getInt); + } else if ("output".equals(fieldName)) { + deserializedMachineRunCommandInstanceView.output = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedMachineRunCommandInstanceView.error = reader.getString(); + } else if ("startTime".equals(fieldName)) { + deserializedMachineRunCommandInstanceView.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("endTime".equals(fieldName)) { + deserializedMachineRunCommandInstanceView.endTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("statuses".equals(fieldName)) { + List statuses + = reader.readArray(reader1 -> ExtensionsResourceStatus.fromJson(reader1)); + deserializedMachineRunCommandInstanceView.statuses = statuses; + } else { + reader.skipChildren(); + } + } + + return deserializedMachineRunCommandInstanceView; + }); + } +} 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 new file mode 100644 index 0000000000000..b452f724f1bf7 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandScriptSource.java @@ -0,0 +1,198 @@ +// 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.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the script sources for run command. Use only one of script, scriptUri, commandId. + */ +@Fluent +public final class MachineRunCommandScriptSource implements JsonSerializable { + /* + * Specifies the script content to be executed on the machine. + */ + private String script; + + /* + * Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or + * public URI. + */ + private String scriptUri; + + /* + * Specifies the commandId of predefined built-in script. + */ + private String commandId; + + /* + * User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in + * case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given + * access to blob's container with 'Storage Blob Data Reader' 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. + */ + private RunCommandManagedIdentity scriptUriManagedIdentity; + + /** + * Creates an instance of MachineRunCommandScriptSource class. + */ + public MachineRunCommandScriptSource() { + } + + /** + * Get the script property: Specifies the script content to be executed on the machine. + * + * @return the script value. + */ + public String script() { + return this.script; + } + + /** + * Set the script property: Specifies the script content to be executed on the machine. + * + * @param script the script value to set. + * @return the MachineRunCommandScriptSource object itself. + */ + public MachineRunCommandScriptSource withScript(String script) { + this.script = script; + return this; + } + + /** + * Get the scriptUri property: Specifies the script download location. It can be either SAS URI of an Azure storage + * blob with read access or public URI. + * + * @return the scriptUri value. + */ + public String scriptUri() { + return this.scriptUri; + } + + /** + * Set the scriptUri property: Specifies the script download location. It can be either SAS URI of an Azure storage + * blob with read access or public URI. + * + * @param scriptUri the scriptUri value to set. + * @return the MachineRunCommandScriptSource object itself. + */ + public MachineRunCommandScriptSource withScriptUri(String scriptUri) { + this.scriptUri = scriptUri; + return this; + } + + /** + * Get the commandId property: Specifies the commandId of predefined built-in script. + * + * @return the commandId value. + */ + public String commandId() { + return this.commandId; + } + + /** + * Set the commandId property: Specifies the commandId of predefined built-in script. + * + * @param commandId the commandId value to set. + * @return the MachineRunCommandScriptSource object itself. + */ + public MachineRunCommandScriptSource withCommandId(String commandId) { + this.commandId = commandId; + return this; + } + + /** + * Get the scriptUriManagedIdentity property: User-assigned managed identity that has access to scriptUri in case of + * Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob + * exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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. + * + * @return the scriptUriManagedIdentity value. + */ + public RunCommandManagedIdentity scriptUriManagedIdentity() { + return this.scriptUriManagedIdentity; + } + + /** + * Set the scriptUriManagedIdentity property: User-assigned managed identity that has access to scriptUri in case of + * Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob + * exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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. + * + * @param scriptUriManagedIdentity the scriptUriManagedIdentity value to set. + * @return the MachineRunCommandScriptSource object itself. + */ + public MachineRunCommandScriptSource + withScriptUriManagedIdentity(RunCommandManagedIdentity scriptUriManagedIdentity) { + this.scriptUriManagedIdentity = scriptUriManagedIdentity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scriptUriManagedIdentity() != null) { + scriptUriManagedIdentity().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("script", this.script); + jsonWriter.writeStringField("scriptUri", this.scriptUri); + jsonWriter.writeStringField("commandId", this.commandId); + jsonWriter.writeJsonField("scriptUriManagedIdentity", this.scriptUriManagedIdentity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineRunCommandScriptSource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MachineRunCommandScriptSource 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 MachineRunCommandScriptSource. + */ + public static MachineRunCommandScriptSource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineRunCommandScriptSource deserializedMachineRunCommandScriptSource + = new MachineRunCommandScriptSource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("script".equals(fieldName)) { + deserializedMachineRunCommandScriptSource.script = reader.getString(); + } else if ("scriptUri".equals(fieldName)) { + deserializedMachineRunCommandScriptSource.scriptUri = reader.getString(); + } else if ("commandId".equals(fieldName)) { + deserializedMachineRunCommandScriptSource.commandId = reader.getString(); + } else if ("scriptUriManagedIdentity".equals(fieldName)) { + deserializedMachineRunCommandScriptSource.scriptUriManagedIdentity + = RunCommandManagedIdentity.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineRunCommandScriptSource; + }); + } +} 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 0000000000000..90444f484dfd1 --- /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 new file mode 100644 index 0000000000000..4df336319cf8e --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java @@ -0,0 +1,145 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of MachineRunCommands. + */ +public interface MachineRunCommands { + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String machineName, String runCommandName); + + /** + * 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. + */ + 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}. + */ + 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. + */ + MachineRunCommand get(String resourceGroupName, String machineName, String runCommandName); + + /** + * The operation to get all the run commands 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 the Run Commands List Result as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String machineName); + + /** + * The operation to get all the run commands 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 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 the Run Commands List Result as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String machineName, String expand, Context context); + + /** + * The operation to get a run command. + * + * @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 describes a Run Command along with {@link Response}. + */ + MachineRunCommand getById(String id); + + /** + * The operation to get a run command. + * + * @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 describes a Run Command along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * The operation to delete a run command. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * The operation to delete a run command. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new MachineRunCommand resource. + * + * @param name resource name. + * @return the first stage of the new MachineRunCommand definition. + */ + MachineRunCommand.DefinitionStages.Blank define(String name); +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandsListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandsListResult.java new file mode 100644 index 0000000000000..392e2073f1ede --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandsListResult.java @@ -0,0 +1,130 @@ +// 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.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner; +import java.io.IOException; +import java.util.List; + +/** + * Describes the Run Commands List Result. + */ +@Fluent +public final class MachineRunCommandsListResult implements JsonSerializable { + /* + * The list of run commands + */ + private List value; + + /* + * 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. + */ + public MachineRunCommandsListResult() { + } + + /** + * Get the value property: The list of run commands. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * 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. + */ + 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MachineRunCommandsListResult from the JsonReader. + * + * @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 IOException If an error occurs while reading the MachineRunCommandsListResult. + */ + public static MachineRunCommandsListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MachineRunCommandsListResult deserializedMachineRunCommandsListResult = new MachineRunCommandsListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> MachineRunCommandInner.fromJson(reader1)); + deserializedMachineRunCommandsListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedMachineRunCommandsListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedMachineRunCommandsListResult; + }); + } +} 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 ca8ae024f28c5..cffad236fc562 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 @@ -17,6 +17,21 @@ */ @Fluent public final class NetworkInterface implements JsonSerializable { + /* + * Represents MAC address of the network interface. + */ + private String macAddress; + + /* + * Represents the ID of the network interface. + */ + private String id; + + /* + * Represents the name of the network interface. + */ + private String name; + /* * The list of IP addresses in this interface. */ @@ -28,6 +43,66 @@ public final class NetworkInterface implements JsonSerializable writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -84,7 +162,13 @@ public static NetworkInterface fromJson(JsonReader jsonReader) throws IOExceptio String fieldName = reader.getFieldName(); reader.nextToken(); - if ("ipAddresses".equals(fieldName)) { + if ("macAddress".equals(fieldName)) { + deserializedNetworkInterface.macAddress = reader.getString(); + } else if ("id".equals(fieldName)) { + deserializedNetworkInterface.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkInterface.name = reader.getString(); + } else if ("ipAddresses".equals(fieldName)) { List ipAddresses = reader.readArray(reader1 -> IpAddress.fromJson(reader1)); deserializedNetworkInterface.ipAddresses = ipAddresses; } else { 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 new file mode 100644 index 0000000000000..0389cf97e5e08 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Processor.java @@ -0,0 +1,97 @@ +// 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.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the firmware of the machine. + */ +@Immutable +public final class Processor implements JsonSerializable { + /* + * The name of the processor. + */ + private String name; + + /* + * The total number of physical cores on the processor. + */ + private Integer numberOfCores; + + /** + * Creates an instance of Processor class. + */ + public Processor() { + } + + /** + * Get the name property: The name of the processor. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the numberOfCores property: The total number of physical cores on the processor. + * + * @return the numberOfCores value. + */ + public Integer numberOfCores() { + return this.numberOfCores; + } + + /** + * 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(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Processor from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Processor 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 Processor. + */ + public static Processor fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Processor deserializedProcessor = new Processor(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedProcessor.name = reader.getString(); + } else if ("numberOfCores".equals(fieldName)) { + deserializedProcessor.numberOfCores = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedProcessor; + }); + } +} 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 new file mode 100644 index 0000000000000..c19608b55b2b9 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandInputParameter.java @@ -0,0 +1,133 @@ +// 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.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes the properties of a run command parameter. + */ +@Fluent +public final class RunCommandInputParameter implements JsonSerializable { + /* + * The run command parameter name. + */ + private String name; + + /* + * The run command parameter value. + */ + private String value; + + /** + * Creates an instance of RunCommandInputParameter class. + */ + public RunCommandInputParameter() { + } + + /** + * Get the name property: The run command parameter name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The run command parameter name. + * + * @param name the name value to set. + * @return the RunCommandInputParameter object itself. + */ + public RunCommandInputParameter withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: The run command parameter value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The run command parameter value. + * + * @param value the value value to set. + * @return the RunCommandInputParameter object itself. + */ + public RunCommandInputParameter withValue(String value) { + this.value = 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} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RunCommandInputParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RunCommandInputParameter 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 RunCommandInputParameter. + */ + public static RunCommandInputParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RunCommandInputParameter deserializedRunCommandInputParameter = new RunCommandInputParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedRunCommandInputParameter.name = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedRunCommandInputParameter.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRunCommandInputParameter; + }); + } +} 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 new file mode 100644 index 0000000000000..8638f8f44ca72 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandManagedIdentity.java @@ -0,0 +1,131 @@ +// 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.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains clientId or objectId (use only one, not both) of a user-assigned managed identity that has access to storage + * blob used in Run Command. Use an empty RunCommandManagedIdentity object in case of system-assigned identity. Make + * sure the Azure storage blob exists in case of scriptUri, and managed identity has been given access to blob's + * container with 'Storage Blob Data Reader' role assignment with scriptUri blob and 'Storage Blob Data Contributor' for + * Append blobs(outputBlobUri, errorBlobUri). 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. + */ +@Fluent +public final class RunCommandManagedIdentity implements JsonSerializable { + /* + * Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. + */ + private String clientId; + + /* + * Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. + */ + private String objectId; + + /** + * Creates an instance of RunCommandManagedIdentity class. + */ + public RunCommandManagedIdentity() { + } + + /** + * Get the clientId property: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be + * used if this is provided. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be + * used if this is provided. + * + * @param clientId the clientId value to set. + * @return the RunCommandManagedIdentity object itself. + */ + public RunCommandManagedIdentity withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the objectId property: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be + * used if this is provided. + * + * @return the objectId value. + */ + public String objectId() { + return this.objectId; + } + + /** + * Set the objectId property: Object Id (GUID value) of the user-assigned managed identity. ClientId should not be + * used if this is provided. + * + * @param objectId the objectId value to set. + * @return the RunCommandManagedIdentity object itself. + */ + public RunCommandManagedIdentity withObjectId(String objectId) { + this.objectId = objectId; + 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("clientId", this.clientId); + jsonWriter.writeStringField("objectId", this.objectId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RunCommandManagedIdentity from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RunCommandManagedIdentity 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 RunCommandManagedIdentity. + */ + public static RunCommandManagedIdentity fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RunCommandManagedIdentity deserializedRunCommandManagedIdentity = new RunCommandManagedIdentity(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("clientId".equals(fieldName)) { + deserializedRunCommandManagedIdentity.clientId = reader.getString(); + } else if ("objectId".equals(fieldName)) { + deserializedRunCommandManagedIdentity.objectId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRunCommandManagedIdentity; + }); + } +} 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 new file mode 100644 index 0000000000000..ff24798c00e09 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Settings.java @@ -0,0 +1,62 @@ +// 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.management.SystemData; +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; + +/** + * An immutable client-side representation of Settings. + */ +public interface Settings { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the tenantId property: Azure resource tenant Id. + * + * @return the tenantId value. + */ + String tenantId(); + + /** + * Gets the gatewayResourceId property: Associated Gateway Resource Id. + * + * @return the gatewayResourceId value. + */ + String gatewayResourceId(); + + /** + * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner object. + * + * @return the inner object. + */ + SettingsInner innerModel(); +} 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 new file mode 100644 index 0000000000000..4185c40882fe0 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/SettingsOperations.java @@ -0,0 +1,117 @@ +// 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.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; + +/** + * Resource collection API of SettingsOperations. + */ +public interface SettingsOperations { + /** + * Returns the base Settings for the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings 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 response body along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, Context context); + + /** + * Returns the base Settings for the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings 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. + */ + Settings get(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, + String settingsResourceName); + + /** + * Updates the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 updateWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context); + + /** + * Updates the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + Settings update(String resourceGroupName, String baseProvider, String baseResourceType, String baseResourceName, + String settingsResourceName, SettingsInner parameters); + + /** + * Update the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 patchWithResponse(String resourceGroupName, String baseProvider, String baseResourceType, + String baseResourceName, String settingsResourceName, SettingsInner parameters, Context context); + + /** + * Update the base Settings of the target resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param baseProvider The name of the base Resource Provider. + * @param baseResourceType The name of the base Resource Type. + * @param baseResourceName The name of the base resource. + * @param settingsResourceName The name of the settings resource. + * @param parameters Settings details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + 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/StorageProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StorageProfile.java new file mode 100644 index 0000000000000..9b983bd86e011 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StorageProfile.java @@ -0,0 +1,98 @@ +// 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.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Describes the storage configuration of the machine. + */ +@Fluent +public final class StorageProfile implements JsonSerializable { + /* + * The disks on the machine. + */ + private List disks; + + /** + * Creates an instance of StorageProfile class. + */ + public StorageProfile() { + } + + /** + * Get the disks property: The disks on the machine. + * + * @return the disks value. + */ + 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(); + } + + /** + * Reads an instance of StorageProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageProfile 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 StorageProfile. + */ + public static StorageProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageProfile deserializedStorageProfile = new StorageProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("disks".equals(fieldName)) { + List disks = reader.readArray(reader1 -> Disk.fromJson(reader1)); + deserializedStorageProfile.disks = disks; + } else { + reader.skipChildren(); + } + } + + return deserializedStorageProfile; + }); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hybridcompute/proxy-config.json b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hybridcompute/proxy-config.json index 7966cf866a166..ab0aaf75d4c62 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hybridcompute/proxy-config.json +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hybridcompute/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.hybridcompute.implementation.ExtensionMetadatasClientImpl$ExtensionMetadatasService"],["com.azure.resourcemanager.hybridcompute.implementation.LicenseProfilesClientImpl$LicenseProfilesService"],["com.azure.resourcemanager.hybridcompute.implementation.LicensesClientImpl$LicensesService"],["com.azure.resourcemanager.hybridcompute.implementation.MachineExtensionsClientImpl$MachineExtensionsService"],["com.azure.resourcemanager.hybridcompute.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.hybridcompute.implementation.NetworkProfilesClientImpl$NetworkProfilesService"],["com.azure.resourcemanager.hybridcompute.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.hybridcompute.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.hybridcompute.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkScopesClientImpl$PrivateLinkScopesService"],["com.azure.resourcemanager.hybridcompute.implementation.ResourceProvidersClientImpl$ResourceProvidersService"]] \ No newline at end of file +[["com.azure.resourcemanager.hybridcompute.implementation.ExtensionMetadatasClientImpl$ExtensionMetadatasService"],["com.azure.resourcemanager.hybridcompute.implementation.GatewaysClientImpl$GatewaysService"],["com.azure.resourcemanager.hybridcompute.implementation.LicenseProfilesClientImpl$LicenseProfilesService"],["com.azure.resourcemanager.hybridcompute.implementation.LicensesClientImpl$LicensesService"],["com.azure.resourcemanager.hybridcompute.implementation.MachineExtensionsClientImpl$MachineExtensionsService"],["com.azure.resourcemanager.hybridcompute.implementation.MachineRunCommandsClientImpl$MachineRunCommandsService"],["com.azure.resourcemanager.hybridcompute.implementation.MachinesClientImpl$MachinesService"],["com.azure.resourcemanager.hybridcompute.implementation.NetworkProfilesClientImpl$NetworkProfilesService"],["com.azure.resourcemanager.hybridcompute.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.hybridcompute.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.hybridcompute.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkScopesClientImpl$PrivateLinkScopesService"],["com.azure.resourcemanager.hybridcompute.implementation.ResourceProvidersClientImpl$ResourceProvidersService"],["com.azure.resourcemanager.hybridcompute.implementation.SettingsOperationsClientImpl$SettingsOperationsService"]] \ 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 547be90789a5d..ac8569ba625e2 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 @@ -10,8 +10,8 @@ public final class ExtensionMetadataGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * ExtensionMetadata_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 a6b1e155ef240..e0b851531aa93 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 @@ -10,8 +10,8 @@ public final class ExtensionMetadataListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * ExtensionMetadata_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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/GatewaysCreateOrUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..c6f785366200a --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateSamples.java @@ -0,0 +1,33 @@ +// 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.generated; + +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +import java.util.Arrays; + +/** + * Samples for Gateways CreateOrUpdate. + */ +public final class GatewaysCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update a Gateway. + * + * @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(); + } +} 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 new file mode 100644 index 0000000000000..0b764081761de --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysDeleteSamples.java @@ -0,0 +1,24 @@ +// 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.generated; + +/** + * Samples for Gateways Delete. + */ +public final class GatewaysDeleteSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_Delete.json + */ + /** + * Sample code: Delete a Gateway. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..4f7316f74e7ee --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +/** + * Samples for Gateways GetByResourceGroup. + */ +public final class GatewaysGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_Get.json + */ + /** + * Sample code: Get Gateway. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..a1b0e762426d5 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +/** + * Samples for Gateways ListByResourceGroup. + */ +public final class GatewaysListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_ListByResourceGroup.json + */ + /** + * Sample code: List Gateways by Resource Group. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..e80ec4bccb4e8 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +/** + * Samples for Gateways List. + */ +public final class GatewaysListSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_ListBySubscription.json + */ + /** + * Sample code: List Gateways by Subscription. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..33559010602f1 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysUpdateSamples.java @@ -0,0 +1,30 @@ +// 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.generated; + +import com.azure.resourcemanager.hybridcompute.models.Gateway; +import java.util.Arrays; + +/** + * Samples for Gateways Update. + */ +public final class GatewaysUpdateSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/gateway/ + * Gateway_Update.json + */ + /** + * Sample code: Update a Gateway. + * + * @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(); + } +} 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 46c06dc330a0d..cd2c4bc06a17a 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 @@ -15,8 +15,8 @@ public final class LicenseProfilesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_CreateOrUpdate.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 06962d3782f63..f87d71bd92280 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 @@ -10,8 +10,8 @@ public final class LicenseProfilesDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_Delete.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 3c69b4aefdc5c..ed536e972f26f 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 @@ -10,8 +10,8 @@ public final class LicenseProfilesGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 5337e5d18aa0b..3e224da510747 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 @@ -10,8 +10,8 @@ public final class LicenseProfilesListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 1fdaf921dbcbd..d693fd4a021e3 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 @@ -16,8 +16,8 @@ public final class LicenseProfilesUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/licenseProfile/ - * LicenseProfile_Update.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 0e1b148ad63a8..4267d2ed2f6b9 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 @@ -17,7 +17,7 @@ public final class LicensesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_CreateOrUpdate.json */ /** 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 7d6a617b3294a..ff3185c8215dd 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 @@ -10,7 +10,7 @@ public final class LicensesDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_Delete.json */ /** 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 b246111c5b4b5..08d24bd9c5ab9 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 @@ -10,7 +10,7 @@ public final class LicensesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_Get.json */ /** 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 cf27868fba1d6..6da5740643866 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 @@ -10,7 +10,7 @@ public final class LicensesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_ListByResourceGroup.json */ /** 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 54d88dae713b7..42b520e62644b 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 @@ -10,7 +10,7 @@ public final class LicensesListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_ListBySubscription.json */ /** 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 462cbb89073ec..1c8169a3cc506 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 @@ -17,7 +17,7 @@ public final class LicensesUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_Update.json */ /** 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 d405de2284cc1..772d747583b37 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 @@ -18,7 +18,7 @@ public final class LicensesValidateLicenseSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/license/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/license/ * License_ValidateLicense.json */ /** 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 f9ba25905c959..fb209688fd0a7 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 @@ -14,8 +14,8 @@ public final class MachineExtensionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_CreateOrUpdate.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 2bad57f3d0e16..ff2f2db66094e 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 @@ -10,8 +10,8 @@ public final class MachineExtensionsDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_Delete.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 4c33568199e3c..4d9675a83e2b6 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 @@ -10,8 +10,8 @@ public final class MachineExtensionsGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 b68557537cc69..14bbb7c846361 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 @@ -10,8 +10,8 @@ public final class MachineExtensionsListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 5abe4c67557e9..640c8a17af0d5 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 @@ -14,8 +14,8 @@ public final class MachineExtensionsUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extension_Update.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 new file mode 100644 index 0000000000000..e6efe6c2b03b0 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsCreateOrUpdateSamples.java @@ -0,0 +1,42 @@ +// 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.generated; + +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandScriptSource; +import com.azure.resourcemanager.hybridcompute.models.RunCommandInputParameter; +import java.util.Arrays; + +/** + * Samples for MachineRunCommands CreateOrUpdate. + */ +public final class MachineRunCommandsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * runCommand/RunCommands_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update a Run Command. + * + * @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(); + } +} 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 new file mode 100644 index 0000000000000..7d6aa092d69b6 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsDeleteSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +/** + * Samples for MachineRunCommands Delete. + */ +public final class MachineRunCommandsDeleteSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * runCommand/RunCommands_Delete.json + */ + /** + * Sample code: Delete a Machine Run Command. + * + * @param manager Entry point to HybridComputeManager. + */ + public static void deleteAMachineRunCommand(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineRunCommands() + .delete("myResourceGroup", "myMachine", "myRunCommand", com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..1b4dba2d8ea2e --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsGetSamples.java @@ -0,0 +1,25 @@ +// 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.generated; + +/** + * Samples for MachineRunCommands Get. + */ +public final class MachineRunCommandsGetSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * runCommand/RunCommands_Get.json + */ + /** + * Sample code: Get a Run Command. + * + * @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); + } +} 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 new file mode 100644 index 0000000000000..78ea746b7d348 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsListSamples.java @@ -0,0 +1,24 @@ +// 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.generated; + +/** + * Samples for MachineRunCommands List. + */ +public final class MachineRunCommandsListSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * runCommand/RunCommands_List.json + */ + /** + * Sample code: GET all Machine Run Commands. + * + * @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); + } +} 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 56174712a6b1e..143f5c3b51a86 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 @@ -10,7 +10,7 @@ public final class MachinesAssessPatchesSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machine_AssessPatches.json */ /** 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 b41f79627e71e..266f7075ead7f 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 @@ -10,7 +10,7 @@ public final class MachinesDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_Delete.json */ /** 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 b35ac46856663..3c820fe18098a 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 @@ -12,7 +12,7 @@ public final class MachinesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_Get_LicenseProfileInstanceView.json */ /** @@ -29,7 +29,7 @@ public final class MachinesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_Get.json */ /** 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 6b826cd6cbc56..253b2b397726a 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 @@ -18,7 +18,7 @@ public final class MachinesInstallPatchesSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machine_InstallPatches.json */ /** 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 66263004fff25..4a6747a651040 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 @@ -10,7 +10,7 @@ public final class MachinesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_ListByResourceGroup.json */ /** 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 da86bf3f0c188..6716ed8c24701 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 @@ -10,7 +10,7 @@ public final class MachinesListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/machine/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/machine/ * Machines_ListBySubscription.json */ /** 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 147f927e558ac..ac38ff7ff35be 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 @@ -10,7 +10,7 @@ public final class NetworkProfileGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ * NetworkProfile_Get.json */ /** 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 2280fd408a048..02e1cad01f79d 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 @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationGet.json */ /** 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 8a33092fd0c54..a5c7b6cfb4e65 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 @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationList.json */ /** 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 a3bbbba352dc3..94c30aafeb62a 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 @@ -10,7 +10,7 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/ + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ * networkSecurityPerimeterConfiguration/NetworkSecurityPerimeterConfigurationReconcile.json */ /** 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 cca85367bf659..ac70c4156e5d3 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 @@ -10,8 +10,8 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/Operations_List. - * json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 7065d3a01bdd0..d3f32c51e2fc7 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 @@ -13,8 +13,8 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/ - * PrivateEndpointConnection_Update.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 d42c261995a37..ef777a0e54ed8 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 @@ -10,8 +10,8 @@ public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/ - * PrivateEndpointConnection_Delete.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 bbcc84657dfd1..497a7a4f0de5d 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 @@ -10,8 +10,8 @@ public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/ - * PrivateEndpointConnection_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 65f847e202d62..273997fe8cca8 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 @@ -10,8 +10,8 @@ public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateEndpoint/ - * PrivateEndpointConnection_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 2727f89f7d90a..ba4a24e5c8ba5 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 @@ -10,8 +10,8 @@ public final class PrivateLinkResourcesGetSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopePrivateLinkResource_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 d492291c08c42..d0d4ab7e6af52 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 @@ -10,8 +10,8 @@ public final class PrivateLinkResourcesListByPrivateLinkScopeSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopePrivateLinkResource_ListGet.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 25b99503535a8..1c089333f3972 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 @@ -13,8 +13,8 @@ public final class PrivateLinkScopesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_Create.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/ + * privateLinkScope/PrivateLinkScopes_Create.json */ /** * Sample code: PrivateLinkScopeCreate. @@ -31,8 +31,8 @@ public static void privateLinkScopeCreate(com.azure.resourcemanager.hybridcomput /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_Update.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 ce0a3ef46e573..1bde0c988b2ac 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 @@ -10,8 +10,8 @@ public final class PrivateLinkScopesDeleteSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_Delete.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 3f8df4849ed50..6ab5f4b4288f6 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 @@ -10,8 +10,8 @@ public final class PrivateLinkScopesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_Get.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 5ef2d6c401475..953c5f1fdee4a 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 @@ -10,8 +10,8 @@ public final class PrivateLinkScopesGetValidationDetailsForMachineSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_GetValidationForMachine.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 c1ab41ea50f24..e6c735f492a00 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 @@ -10,8 +10,8 @@ public final class PrivateLinkScopesGetValidationDetailsSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_GetValidation.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 f48b9901dd321..b3c6bf37580ee 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 @@ -10,8 +10,8 @@ public final class PrivateLinkScopesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_ListByResourceGroup.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 f2c095bd16761..cb8d4cf4b69ba 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 @@ -10,8 +10,8 @@ public final class PrivateLinkScopesListSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_List.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 e0a9f4f2cd256..d8b3cfd6e1e82 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 @@ -14,8 +14,8 @@ public final class PrivateLinkScopesUpdateTagsSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/privateLinkScope/ - * PrivateLinkScopes_UpdateTagsOnly.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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/ResourceProviderUpgradeExtensionsSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProviderUpgradeExtensionsSamples.java index b6fea8bc1cf3c..b01912f636716 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 @@ -15,8 +15,8 @@ public final class ResourceProviderUpgradeExtensionsSamples { /* * x-ms-original-file: - * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/stable/2024-07-10/examples/extension/ - * Extensions_Upgrade.json + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-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 new file mode 100644 index 0000000000000..5e610f546fba2 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationGetSamples.java @@ -0,0 +1,26 @@ +// 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.generated; + +/** + * Samples for SettingsOperation Get. + */ +public final class SettingsOperationGetSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings + * /SettingsGet.json + */ + /** + * Sample code: NetworkConfigurationsGet. + * + * @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", + com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..515a91f6a3935 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationPatchSamples.java @@ -0,0 +1,31 @@ +// 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.generated; + +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; + +/** + * Samples for SettingsOperation Patch. + */ +public final class SettingsOperationPatchSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings + * /SettingsPatch.json + */ + /** + * Sample code: NetworkConfigurationsPatch. + * + * @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"), + com.azure.core.util.Context.NONE); + } +} 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 new file mode 100644 index 0000000000000..731a61de30ca2 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationUpdateSamples.java @@ -0,0 +1,30 @@ +// 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.generated; + +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; + +/** + * Samples for SettingsOperation Update. + */ +public final class SettingsOperationUpdateSamples { + /* + * x-ms-original-file: + * specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2024-07-31-preview/examples/settings + * /SettingsUpdate.json + */ + /** + * Sample code: SettingsUpdate. + * + * @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); + } +} 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 index 73d1ce6004f28..8ef47476b7e38 100644 --- 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 @@ -11,7 +11,7 @@ public final class AccessRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessRuleProperties model - = BinaryData.fromString("{\"direction\":\"Inbound\",\"addressPrefixes\":[\"xsmiccwrwfscjf\"]}") + = BinaryData.fromString("{\"direction\":\"Inbound\",\"addressPrefixes\":[\"toqbeitpkxztmoob\"]}") .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 index 2eb7d141e2039..e792dc6689a33 100644 --- 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 @@ -10,8 +10,8 @@ public final class AccessRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AccessRule model = BinaryData.fromString( - "{\"name\":\"tcubiipuipwoqonm\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"izsh\",\"vcimpev\",\"gmblrri\"]}}") + AccessRule model = BinaryData + .fromString("{\"name\":\"b\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"vvib\"]}}") .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 index afe5a82a79958..a5b5808382a04 100644 --- 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 @@ -11,7 +11,7 @@ public final class AgentConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AgentConfiguration model = BinaryData.fromString( - "{\"proxyUrl\":\"ajrmvdjwzrlovmc\",\"incomingConnectionsPorts\":[\"ijcoejctb\",\"aqsqsycbkbfk\"],\"extensionsAllowList\":[{\"publisher\":\"kexxppof\",\"type\":\"axcfjpgddtocjjx\"},{\"publisher\":\"pmouexhdz\",\"type\":\"bqe\"}],\"extensionsBlockList\":[{\"publisher\":\"qbzvddntwnd\",\"type\":\"cbtwnpzaoqvuh\"},{\"publisher\":\"cffcyddglmj\",\"type\":\"jqkwpyeicx\"},{\"publisher\":\"ciwqvhk\",\"type\":\"xuigdtopbobj\"}],\"proxyBypass\":[\"m\"],\"extensionsEnabled\":\"u\",\"guestConfigurationEnabled\":\"a\",\"configMode\":\"full\"}") + "{\"proxyUrl\":\"fwnfnb\",\"incomingConnectionsPorts\":[\"ionle\",\"x\"],\"extensionsAllowList\":[{\"publisher\":\"tzxdpnqbqqwx\",\"type\":\"feallnwsu\"}],\"extensionsBlockList\":[{\"publisher\":\"jampmngnzscxaqw\",\"type\":\"chcbonqvpkvlrxnj\"},{\"publisher\":\"seiphe\",\"type\":\"lokeyy\"},{\"publisher\":\"nj\",\"type\":\"lwtgrhpdj\"}],\"proxyBypass\":[\"masxazjpqyegu\",\"lhbxxhejjzzvdud\",\"wdslfhotwmcy\"],\"extensionsEnabled\":\"wlbjnpgacftade\",\"guestConfigurationEnabled\":\"nltyfsoppusuesnz\",\"configMode\":\"full\"}") .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 index c3b38753cf101..5e841252b0103 100644 --- 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 @@ -13,21 +13,21 @@ public final class AgentUpgradeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AgentUpgrade model = BinaryData.fromString( - "{\"desiredVersion\":\"cgyncocpecf\",\"correlationId\":\"90bafd9b-6353-405e-989c-160d86df46fa\",\"enableAutomaticUpgrade\":true,\"lastAttemptDesiredVersion\":\"ofsx\",\"lastAttemptTimestamp\":\"2021-10-25T19:09:19Z\",\"lastAttemptStatus\":\"Failed\",\"lastAttemptMessage\":\"m\"}") + "{\"desiredVersion\":\"dobpxjmflbvvn\",\"correlationId\":\"ef918254-0dd3-4a1b-9ad9-120def04830c\",\"enableAutomaticUpgrade\":true,\"lastAttemptDesiredVersion\":\"ciwwzjuqkhr\",\"lastAttemptTimestamp\":\"2021-05-22T18:36:22Z\",\"lastAttemptStatus\":\"Failed\",\"lastAttemptMessage\":\"uo\"}") .toObject(AgentUpgrade.class); - Assertions.assertEquals("cgyncocpecf", model.desiredVersion()); - Assertions.assertEquals(UUID.fromString("90bafd9b-6353-405e-989c-160d86df46fa"), model.correlationId()); + Assertions.assertEquals("dobpxjmflbvvn", model.desiredVersion()); + Assertions.assertEquals(UUID.fromString("ef918254-0dd3-4a1b-9ad9-120def04830c"), model.correlationId()); Assertions.assertEquals(true, model.enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AgentUpgrade model = new AgentUpgrade().withDesiredVersion("cgyncocpecf") - .withCorrelationId(UUID.fromString("90bafd9b-6353-405e-989c-160d86df46fa")) + AgentUpgrade model = new AgentUpgrade().withDesiredVersion("dobpxjmflbvvn") + .withCorrelationId(UUID.fromString("ef918254-0dd3-4a1b-9ad9-120def04830c")) .withEnableAutomaticUpgrade(true); model = BinaryData.fromObject(model).toObject(AgentUpgrade.class); - Assertions.assertEquals("cgyncocpecf", model.desiredVersion()); - Assertions.assertEquals(UUID.fromString("90bafd9b-6353-405e-989c-160d86df46fa"), model.correlationId()); + Assertions.assertEquals("dobpxjmflbvvn", model.desiredVersion()); + Assertions.assertEquals(UUID.fromString("ef918254-0dd3-4a1b-9ad9-120def04830c"), model.correlationId()); Assertions.assertEquals(true, 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 index 9e2e0b3f6a27c..5841aab3b86d9 100644 --- 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 @@ -11,7 +11,7 @@ public final class AvailablePatchCountByClassificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AvailablePatchCountByClassification model = BinaryData.fromString( - "{\"security\":1107885702,\"critical\":2129165842,\"definition\":1468596781,\"updateRollup\":1935710102,\"featurePack\":1520620796,\"servicePack\":27642330,\"tools\":1312333731,\"updates\":1098069205,\"other\":2135401961}") + "{\"security\":1928399629,\"critical\":1065588244,\"definition\":1002036598,\"updateRollup\":1194461063,\"featurePack\":1504791861,\"servicePack\":1710295425,\"tools\":1514196335,\"updates\":529783276,\"other\":1199001730}") .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 index a8f0cbf5a7a1a..d9b95ad6cc551 100644 --- 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 @@ -10,7 +10,7 @@ public final class CloudMetadataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CloudMetadata model = BinaryData.fromString("{\"provider\":\"wgndrvynhzgpp\"}").toObject(CloudMetadata.class); + CloudMetadata model = BinaryData.fromString("{\"provider\":\"sovmyokacspkwl\"}").toObject(CloudMetadata.class); } @org.junit.jupiter.api.Test 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 index 308682f0c2e44..b1a2716f51798 100644 --- 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 @@ -10,9 +10,8 @@ public final class ConfigurationExtensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ConfigurationExtension model - = BinaryData.fromString("{\"publisher\":\"ayvvtpgvdf\",\"type\":\"otkftutqxlngx\"}") - .toObject(ConfigurationExtension.class); + ConfigurationExtension model = BinaryData.fromString("{\"publisher\":\"bavo\",\"type\":\"zdmohctbqvu\"}") + .toObject(ConfigurationExtension.class); } @org.junit.jupiter.api.Test 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 index 7b28e18900af6..624e6454cfd48 100644 --- 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 @@ -11,7 +11,7 @@ public final class ConnectionDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConnectionDetail model = BinaryData.fromString( - "{\"id\":\"thtywub\",\"privateIpAddress\":\"bihwqknfdnt\",\"linkIdentifier\":\"chrdgoihxumwcto\",\"groupId\":\"zj\",\"memberName\":\"udfdlwgg\"}") + "{\"id\":\"zjb\",\"privateIpAddress\":\"zsxjrkambtrneg\",\"linkIdentifier\":\"nvuqeqvldspa\",\"groupId\":\"jbkkdmflvestmjl\",\"memberName\":\"ril\"}") .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 new file mode 100644 index 0000000000000..1eb97b7c4878c --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/DiskTests.java @@ -0,0 +1,44 @@ +// 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.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\":\"uxh\",\"diskType\":\"udxorrqn\",\"generatedId\":\"oczvy\",\"id\":\"qrvkdv\",\"name\":\"llr\",\"maxSizeInBytes\":135145213418293643,\"usedSpaceInBytes\":4797144468596262897}") + .toObject(Disk.class); + Assertions.assertEquals("uxh", model.path()); + Assertions.assertEquals("udxorrqn", model.diskType()); + Assertions.assertEquals("oczvy", model.generatedId()); + Assertions.assertEquals("qrvkdv", model.id()); + Assertions.assertEquals("llr", model.name()); + Assertions.assertEquals(135145213418293643L, model.maxSizeInBytes()); + Assertions.assertEquals(4797144468596262897L, model.usedSpaceInBytes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Disk model = new Disk().withPath("uxh") + .withDiskType("udxorrqn") + .withGeneratedId("oczvy") + .withId("qrvkdv") + .withName("llr") + .withMaxSizeInBytes(135145213418293643L) + .withUsedSpaceInBytes(4797144468596262897L); + model = BinaryData.fromObject(model).toObject(Disk.class); + Assertions.assertEquals("uxh", model.path()); + Assertions.assertEquals("udxorrqn", model.diskType()); + Assertions.assertEquals("oczvy", model.generatedId()); + Assertions.assertEquals("qrvkdv", model.id()); + Assertions.assertEquals("llr", model.name()); + Assertions.assertEquals(135145213418293643L, model.maxSizeInBytes()); + Assertions.assertEquals(4797144468596262897L, 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 index 7373cf5336ac2..1def2a8cc7df8 100644 --- 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 @@ -11,16 +11,16 @@ public final class EsuKeyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EsuKey model = BinaryData.fromString("{\"sku\":\"ymddys\",\"licenseStatus\":30564685}").toObject(EsuKey.class); - Assertions.assertEquals("ymddys", model.sku()); - Assertions.assertEquals(30564685, model.licenseStatus()); + EsuKey model = BinaryData.fromString("{\"sku\":\"cxgod\",\"licenseStatus\":1209438571}").toObject(EsuKey.class); + Assertions.assertEquals("cxgod", model.sku()); + Assertions.assertEquals(1209438571, model.licenseStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EsuKey model = new EsuKey().withSku("ymddys").withLicenseStatus(30564685); + EsuKey model = new EsuKey().withSku("cxgod").withLicenseStatus(1209438571); model = BinaryData.fromObject(model).toObject(EsuKey.class); - Assertions.assertEquals("ymddys", model.sku()); - Assertions.assertEquals(30564685, model.licenseStatus()); + Assertions.assertEquals("cxgod", model.sku()); + Assertions.assertEquals(1209438571, 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 index a55ea51c94586..82d549d38d1d9 100644 --- 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 @@ -11,15 +11,15 @@ public final class EsuProfileUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EsuProfileUpdateProperties model = BinaryData.fromString("{\"assignedLicense\":\"moyrxvwfudwpz\"}") + EsuProfileUpdateProperties model = BinaryData.fromString("{\"assignedLicense\":\"alaulppggdtpnapn\"}") .toObject(EsuProfileUpdateProperties.class); - Assertions.assertEquals("moyrxvwfudwpz", model.assignedLicense()); + Assertions.assertEquals("alaulppggdtpnapn", model.assignedLicense()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EsuProfileUpdateProperties model = new EsuProfileUpdateProperties().withAssignedLicense("moyrxvwfudwpz"); + EsuProfileUpdateProperties model = new EsuProfileUpdateProperties().withAssignedLicense("alaulppggdtpnapn"); model = BinaryData.fromObject(model).toObject(EsuProfileUpdateProperties.class); - Assertions.assertEquals("moyrxvwfudwpz", model.assignedLicense()); + Assertions.assertEquals("alaulppggdtpnapn", model.assignedLicense()); } } 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 31eb4052a4b61..e6e65ceb45847 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 @@ -20,7 +20,7 @@ public final class ExtensionMetadatasGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"version\":\"tbzbkiwbuqnyophz\",\"extensionType\":\"l\",\"publisher\":\"crpfbcunez\"},\"id\":\"e\",\"name\":\"elfwy\",\"type\":\"wl\"}"; + = "{\"properties\":{\"version\":\"jimryvwgcwwpbmz\",\"extensionType\":\"esyds\",\"publisher\":\"efoh\"},\"id\":\"bvopwndyqle\",\"name\":\"llklmtk\",\"type\":\"lowkxxpvb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,7 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); ExtensionValue response = manager.extensionMetadatas() - .getWithResponse("mspofapvuhryl", "iofrzgbzjedmstk", "nlvxbcuii", "nktwfansnvpdibmi", - com.azure.core.util.Context.NONE) + .getWithResponse("gf", "tmhqykiz", "d", "saoafcluqvox", 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 124a8c0a26ee9..735756a27fe6a 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 @@ -21,7 +21,7 @@ public final class ExtensionMetadatasListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"version\":\"mwqkchcxwaxf\",\"extensionType\":\"zjkjexfdeqv\",\"publisher\":\"sylkks\"},\"id\":\"bffmbmxz\",\"name\":\"rgywwp\",\"type\":\"jx\"}]}"; + = "{\"value\":[{\"properties\":{\"version\":\"jlpjrtwszhv\",\"extensionType\":\"icphvtrrmhw\",\"publisher\":\"fdpyflubh\"},\"id\":\"glrocuy\",\"name\":\"lw\",\"type\":\"hmem\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,7 +31,7 @@ public void testList() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.extensionMetadatas().list("xjwet", "psihcla", "zvaylptrsqqw", com.azure.core.util.Context.NONE); + = manager.extensionMetadatas().list("dfjmzsyzfhotlh", "k", "yych", com.azure.core.util.Context.NONE); } } 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 index ac15dc3df9a57..d6140b0e96dea 100644 --- 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 @@ -11,15 +11,15 @@ public final class ExtensionTargetPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExtensionTargetProperties model - = BinaryData.fromString("{\"targetVersion\":\"qxn\"}").toObject(ExtensionTargetProperties.class); - Assertions.assertEquals("qxn", model.targetVersion()); + ExtensionTargetProperties model = BinaryData.fromString("{\"targetVersion\":\"lyzrpzbchckqqzqi\"}") + .toObject(ExtensionTargetProperties.class); + Assertions.assertEquals("lyzrpzbchckqqzqi", model.targetVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionTargetProperties model = new ExtensionTargetProperties().withTargetVersion("qxn"); + ExtensionTargetProperties model = new ExtensionTargetProperties().withTargetVersion("lyzrpzbchckqqzqi"); model = BinaryData.fromObject(model).toObject(ExtensionTargetProperties.class); - Assertions.assertEquals("qxn", model.targetVersion()); + Assertions.assertEquals("lyzrpzbchckqqzqi", model.targetVersion()); } } 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 index e37fa5b7e6f14..78b49fb8d3153 100644 --- 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 @@ -11,7 +11,7 @@ public final class ExtensionValueInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionValueInner model = BinaryData.fromString( - "{\"properties\":{\"version\":\"zgx\",\"extensionType\":\"ripl\",\"publisher\":\"odxun\"},\"id\":\"ebxmubyynt\",\"name\":\"lrb\",\"type\":\"tkoievseotgq\"}") + "{\"properties\":{\"version\":\"ysuiizynkedya\",\"extensionType\":\"wyhqmibzyhwits\",\"publisher\":\"pyy\"},\"id\":\"cdpu\",\"name\":\"nzgmwznmabik\",\"type\":\"sorgj\"}") .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 index ef735f9e658cb..f95976be1424d 100644 --- 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 @@ -11,7 +11,7 @@ public final class ExtensionValueListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionValueListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"version\":\"ebmnzbtbhjpglk\",\"extensionType\":\"ohdneuel\",\"publisher\":\"hsd\"},\"id\":\"t\",\"name\":\"zfikd\",\"type\":\"wwquuvxzxclvithh\"}]}") + "{\"value\":[{\"properties\":{\"version\":\"ltdtbnnhad\",\"extensionType\":\"crkvcikhnv\",\"publisher\":\"mqg\"},\"id\":\"queziky\",\"name\":\"ggxkallatmelwuip\",\"type\":\"ccjzkzivgvv\"},{\"properties\":{\"version\":\"y\",\"extensionType\":\"yrnxxmueedn\",\"publisher\":\"dvstkw\"},\"id\":\"tchealmf\",\"name\":\"tdaaygdvwvg\",\"type\":\"iohgwxrtfud\"},{\"properties\":{\"version\":\"xg\",\"extensionType\":\"agvrvmnpkuk\",\"publisher\":\"i\"},\"id\":\"blxgwimf\",\"name\":\"jhfjxwm\",\"type\":\"zk\"},{\"properties\":{\"version\":\"qreyfkzi\",\"extensionType\":\"jawneaiv\",\"publisher\":\"czelpcirel\"},\"id\":\"eae\",\"name\":\"wabfatkl\",\"type\":\"dxbjhwuaanozj\"}]}") .toObject(ExtensionValueListResult.class); } 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 index 34f2c77f71896..72219ec78f93a 100644 --- 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 @@ -11,7 +11,7 @@ public final class ExtensionValuePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ExtensionValueProperties model = BinaryData - .fromString("{\"version\":\"ltmuwlauwzizx\",\"extensionType\":\"pgcjefuzmuvp\",\"publisher\":\"tdum\"}") + .fromString("{\"version\":\"bldtlww\",\"extensionType\":\"kdmtncvokotll\",\"publisher\":\"yhgsy\"}") .toObject(ExtensionValueProperties.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 new file mode 100644 index 0000000000000..24582814fb33e --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/FirmwareProfileTests.java @@ -0,0 +1,22 @@ +// 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.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\":\"kpnpulexxbczwtr\",\"type\":\"iqzbq\"}") + .toObject(FirmwareProfile.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + FirmwareProfile model = new FirmwareProfile(); + model = BinaryData.fromObject(model).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 new file mode 100644 index 0000000000000..3a52038ab7669 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayInnerTests.java @@ -0,0 +1,52 @@ +// 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.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\":\"Failed\",\"gatewayId\":\"aenuuz\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"minrfdw\",\"allowedFeatures\":[\"hhziuief\",\"zbhd\",\"smlmzqhoftrm\",\"equi\"]},\"location\":\"xicslfao\",\"tags\":{\"kaivwit\":\"iyylhalnswhccsp\",\"bwemhairs\":\"scywuggwoluhc\",\"w\":\"rgzdwmsweyp\",\"tlstvlzywem\":\"xggicccnxqhuexmk\"},\"id\":\"zrncsdt\",\"name\":\"lusiy\",\"type\":\"bsfgytguslfea\"}") + .toObject(GatewayInner.class); + Assertions.assertEquals("xicslfao", model.location()); + Assertions.assertEquals("iyylhalnswhccsp", model.tags().get("kaivwit")); + Assertions.assertEquals(GatewayType.PUBLIC, model.gatewayType()); + Assertions.assertEquals("hhziuief", model.allowedFeatures().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GatewayInner model = new GatewayInner().withLocation("xicslfao") + .withTags(mapOf("kaivwit", "iyylhalnswhccsp", "bwemhairs", "scywuggwoluhc", "w", "rgzdwmsweyp", + "tlstvlzywem", "xggicccnxqhuexmk")) + .withGatewayType(GatewayType.PUBLIC) + .withAllowedFeatures(Arrays.asList("hhziuief", "zbhd", "smlmzqhoftrm", "equi")); + model = BinaryData.fromObject(model).toObject(GatewayInner.class); + Assertions.assertEquals("xicslfao", model.location()); + Assertions.assertEquals("iyylhalnswhccsp", model.tags().get("kaivwit")); + Assertions.assertEquals(GatewayType.PUBLIC, model.gatewayType()); + Assertions.assertEquals("hhziuief", 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 new file mode 100644 index 0000000000000..c368a1b4e9c11 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayPropertiesTests.java @@ -0,0 +1,31 @@ +// 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.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\":\"Failed\",\"gatewayId\":\"qukyhejhzi\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"pelol\",\"allowedFeatures\":[\"ksrpqv\"]}") + .toObject(GatewayProperties.class); + Assertions.assertEquals(GatewayType.PUBLIC, model.gatewayType()); + Assertions.assertEquals("ksrpqv", model.allowedFeatures().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GatewayProperties model + = new GatewayProperties().withGatewayType(GatewayType.PUBLIC).withAllowedFeatures(Arrays.asList("ksrpqv")); + model = BinaryData.fromObject(model).toObject(GatewayProperties.class); + Assertions.assertEquals(GatewayType.PUBLIC, model.gatewayType()); + Assertions.assertEquals("ksrpqv", 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 new file mode 100644 index 0000000000000..bd71be0aa80c0 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdatePropertiesTests.java @@ -0,0 +1,28 @@ +// 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.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\":[\"wpracstwitykhev\",\"c\",\"edcpnmdyodnwzxl\"]}") + .toObject(GatewayUpdateProperties.class); + Assertions.assertEquals("wpracstwitykhev", model.allowedFeatures().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GatewayUpdateProperties model = new GatewayUpdateProperties() + .withAllowedFeatures(Arrays.asList("wpracstwitykhev", "c", "edcpnmdyodnwzxl")); + model = BinaryData.fromObject(model).toObject(GatewayUpdateProperties.class); + Assertions.assertEquals("wpracstwitykhev", 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 new file mode 100644 index 0000000000000..48820fc1dd15f --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewayUpdateTests.java @@ -0,0 +1,44 @@ +// 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.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\":[\"aehtwd\",\"r\",\"tswiby\"]},\"tags\":{\"h\":\"l\"}}") + .toObject(GatewayUpdate.class); + Assertions.assertEquals("l", model.tags().get("h")); + Assertions.assertEquals("aehtwd", model.allowedFeatures().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GatewayUpdate model + = new GatewayUpdate().withTags(mapOf("h", "l")).withAllowedFeatures(Arrays.asList("aehtwd", "r", "tswiby")); + model = BinaryData.fromObject(model).toObject(GatewayUpdate.class); + Assertions.assertEquals("l", model.tags().get("h")); + Assertions.assertEquals("aehtwd", 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 new file mode 100644 index 0000000000000..72ece989bc7fa --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysCreateOrUpdateMockTests.java @@ -0,0 +1,63 @@ +// 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.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.hybridcompute.HybridComputeManager; +import com.azure.resourcemanager.hybridcompute.models.Gateway; +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class GatewaysCreateOrUpdateMockTests { + @Test + public void testCreateOrUpdate() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"gatewayId\":\"rblmli\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"hspnxwqagnepz\",\"allowedFeatures\":[\"lsbs\",\"qqqagwwrxaomzi\",\"glrrczez\"]},\"location\":\"hltnjadhqoawjq\",\"tags\":{\"yrrueqth\":\"eayfbpcmspl\",\"mbscbbx\":\"mg\",\"d\":\"gdhxi\",\"dnafcbqwre\":\"opedbwdpyqyybxub\"},\"id\":\"jelaqacigele\",\"name\":\"hdbvqvwzkjop\",\"type\":\"beonrlkwzdq\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HybridComputeManager manager = HybridComputeManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Gateway response = manager.gateways() + .define("lhkgmnsghp") + .withRegion("csypobkdqzrdzsyl") + .withExistingResourceGroup("ypnyghshxc") + .withTags(mapOf("aurkihcirlde", "gtrczzydmxzjijpv", "urnnqbnqbpiz", "xrdcoxnbkkja")) + .withGatewayType(GatewayType.PUBLIC) + .withAllowedFeatures(Arrays.asList("fwmkoisqcssffxui")) + .create(); + + Assertions.assertEquals("hltnjadhqoawjq", response.location()); + Assertions.assertEquals("eayfbpcmspl", response.tags().get("yrrueqth")); + Assertions.assertEquals(GatewayType.PUBLIC, response.gatewayType()); + Assertions.assertEquals("lsbs", response.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/GatewaysGetByResourceGroupWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupWithResponseMockTests.java new file mode 100644 index 0000000000000..ce1db099330e0 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysGetByResourceGroupWithResponseMockTests.java @@ -0,0 +1,43 @@ +// 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.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.hybridcompute.HybridComputeManager; +import com.azure.resourcemanager.hybridcompute.models.Gateway; +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +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 GatewaysGetByResourceGroupWithResponseMockTests { + @Test + public void testGetByResourceGroupWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Accepted\",\"gatewayId\":\"epmrut\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"aobn\",\"allowedFeatures\":[\"jdjltymkmvgui\",\"ywart\",\"pphkixkykxds\"]},\"location\":\"pemmucfxhik\",\"tags\":{\"s\":\"rmymyincqlhr\",\"iiiovgqcgxuugq\":\"sl\",\"e\":\"ctotiowlx\",\"wphqlkccuzgygqw\":\"dptjgwdtgukranb\"},\"id\":\"hoi\",\"name\":\"lwgniiprglvawu\",\"type\":\"z\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HybridComputeManager manager = HybridComputeManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Gateway response = manager.gateways() + .getByResourceGroupWithResponse("sxze", "paxwkufyk", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("pemmucfxhik", response.location()); + Assertions.assertEquals("rmymyincqlhr", response.tags().get("s")); + Assertions.assertEquals(GatewayType.PUBLIC, response.gatewayType()); + Assertions.assertEquals("jdjltymkmvgui", 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 new file mode 100644 index 0000000000000..a4154a34bdaef --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListByResourceGroupMockTests.java @@ -0,0 +1,43 @@ +// 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.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.hybridcompute.HybridComputeManager; +import com.azure.resourcemanager.hybridcompute.models.Gateway; +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +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 GatewaysListByResourceGroupMockTests { + @Test + public void testListByResourceGroup() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"gatewayId\":\"pmcubkmifoxxkub\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"v\",\"allowedFeatures\":[\"brbqgvgovp\"]},\"location\":\"ttefjoknssq\",\"tags\":{\"rjgeih\":\"edikdfrdbiq\",\"zcxmjpbyep\":\"qlggwfi\",\"rc\":\"mgtvlj\"},\"id\":\"yfqi\",\"name\":\"gxhnpomyqwcabv\",\"type\":\"ui\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HybridComputeManager manager = HybridComputeManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response + = manager.gateways().listByResourceGroup("ufypiv", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("ttefjoknssq", response.iterator().next().location()); + Assertions.assertEquals("edikdfrdbiq", response.iterator().next().tags().get("rjgeih")); + Assertions.assertEquals(GatewayType.PUBLIC, response.iterator().next().gatewayType()); + Assertions.assertEquals("brbqgvgovp", 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 new file mode 100644 index 0000000000000..b9ef5501ab727 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListMockTests.java @@ -0,0 +1,42 @@ +// 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.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.hybridcompute.HybridComputeManager; +import com.azure.resourcemanager.hybridcompute.models.Gateway; +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +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 GatewaysListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"gatewayId\":\"swlpaugmrmfj\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"toaukhfkvcisiz\",\"allowedFeatures\":[\"eds\"]},\"location\":\"wuived\",\"tags\":{\"ei\":\"yeew\",\"mgomg\":\"bp\",\"cshhv\":\"amljdlrgmsplzgau\"},\"id\":\"ewgnxkympqanxrj\",\"name\":\"ixt\",\"type\":\"bta\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HybridComputeManager manager = HybridComputeManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + PagedIterable response = manager.gateways().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("wuived", response.iterator().next().location()); + Assertions.assertEquals("yeew", response.iterator().next().tags().get("ei")); + Assertions.assertEquals(GatewayType.PUBLIC, response.iterator().next().gatewayType()); + Assertions.assertEquals("eds", 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 new file mode 100644 index 0000000000000..88822b2ae8777 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/GatewaysListResultTests.java @@ -0,0 +1,56 @@ +// 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.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridcompute.fluent.models.GatewayInner; +import com.azure.resourcemanager.hybridcompute.models.GatewayType; +import com.azure.resourcemanager.hybridcompute.models.GatewaysListResult; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +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\":\"Failed\",\"gatewayId\":\"ltiugcxnavv\",\"gatewayType\":\"Public\",\"gatewayEndpoint\":\"byqunyow\",\"allowedFeatures\":[\"mdjrkvfgbvfvp\",\"bodacizsjq\",\"hkr\",\"ibdeibq\"]},\"location\":\"qkgh\",\"tags\":{\"rwkq\":\"dzwmkrefajpj\",\"sjabibs\":\"yhgbijtjivfx\",\"bjxbkzbzk\":\"stawfsdjpvkv\"},\"id\":\"vncjabudurgk\",\"name\":\"kmokz\",\"type\":\"jjklff\"}],\"nextLink\":\"ouw\"}") + .toObject(GatewaysListResult.class); + Assertions.assertEquals("qkgh", model.value().get(0).location()); + Assertions.assertEquals("dzwmkrefajpj", model.value().get(0).tags().get("rwkq")); + Assertions.assertEquals(GatewayType.PUBLIC, model.value().get(0).gatewayType()); + Assertions.assertEquals("mdjrkvfgbvfvp", model.value().get(0).allowedFeatures().get(0)); + Assertions.assertEquals("ouw", model.nextLink()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GatewaysListResult model = new GatewaysListResult() + .withValue(Arrays.asList(new GatewayInner().withLocation("qkgh") + .withTags(mapOf("rwkq", "dzwmkrefajpj", "sjabibs", "yhgbijtjivfx", "bjxbkzbzk", "stawfsdjpvkv")) + .withGatewayType(GatewayType.PUBLIC) + .withAllowedFeatures(Arrays.asList("mdjrkvfgbvfvp", "bodacizsjq", "hkr", "ibdeibq")))) + .withNextLink("ouw"); + model = BinaryData.fromObject(model).toObject(GatewaysListResult.class); + Assertions.assertEquals("qkgh", model.value().get(0).location()); + Assertions.assertEquals("dzwmkrefajpj", model.value().get(0).tags().get("rwkq")); + Assertions.assertEquals(GatewayType.PUBLIC, model.value().get(0).gatewayType()); + Assertions.assertEquals("mdjrkvfgbvfvp", model.value().get(0).allowedFeatures().get(0)); + Assertions.assertEquals("ouw", model.nextLink()); + } + + // 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/HardwareProfileTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HardwareProfileTests.java new file mode 100644 index 0000000000000..24ddb19b4c2ec --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/HardwareProfileTests.java @@ -0,0 +1,23 @@ +// 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.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\":6920385011806070705,\"numberOfCpuSockets\":872045444,\"processors\":[{\"name\":\"f\",\"numberOfCores\":1860942440}]}") + .toObject(HardwareProfile.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HardwareProfile model = new HardwareProfile(); + model = BinaryData.fromObject(model).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 index 6c65fb7bbdb52..638235fcc3f1f 100644 --- 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 @@ -16,24 +16,24 @@ public final class HybridComputePrivateLinkScopeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HybridComputePrivateLinkScopeInner model = BinaryData.fromString( - "{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"eedndrdvstkwqqtc\",\"privateLinkScopeId\":\"alm\",\"privateEndpointConnections\":[{\"id\":\"aayg\",\"name\":\"wvgpiohg\",\"type\":\"rtfudxepxg\",\"properties\":{\"privateEndpoint\":{\"id\":\"vrvmnpkukghim\"},\"privateLinkServiceConnectionState\":{\"status\":\"lxgwimfnjhf\",\"description\":\"xw\",\"actionsRequired\":\"zk\"},\"provisioningState\":\"oqreyfkzikfjawn\",\"groupIds\":[\"vxwc\"]}},{\"id\":\"lpcirelsf\",\"name\":\"enwabfatk\",\"type\":\"dxbjhwuaanozj\",\"properties\":{\"privateEndpoint\":{\"id\":\"youlp\"},\"privateLinkServiceConnectionState\":{\"status\":\"v\",\"description\":\"ag\",\"actionsRequired\":\"vimjwos\"},\"provisioningState\":\"xitc\",\"groupIds\":[\"cktqumiekkezzi\",\"hlyfjhdgqgg\",\"bdunygaeqid\"]}},{\"id\":\"fatpxllrxcyjmoa\",\"name\":\"uvarmywdmjsjq\",\"type\":\"hhyxxrw\",\"properties\":{\"privateEndpoint\":{\"id\":\"duhpk\"},\"privateLinkServiceConnectionState\":{\"status\":\"gymare\",\"description\":\"n\",\"actionsRequired\":\"xqugjhkycubedd\"},\"provisioningState\":\"sofwqmzqalkrmnji\",\"groupIds\":[\"acqqudfnbyxbaaab\",\"yvayffimrzr\",\"uzqogsexnevf\"]}}]},\"location\":\"wnwmewzs\",\"tags\":{\"judpfrxt\":\"euzsoi\",\"paxh\":\"thzvaytdwkqbrqu\",\"qoaxoruzfgs\":\"xiilivpdtiirqt\",\"zwl\":\"uyfxrxxleptramxj\"},\"id\":\"nwxuqlcvydyp\",\"name\":\"tdooaoj\",\"type\":\"niodkooeb\"}") + "{\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"reafxtsgumhjg\",\"privateLinkScopeId\":\"kkxwslol\",\"privateEndpointConnections\":[{\"id\":\"uzlm\",\"name\":\"elfk\",\"type\":\"plcrpwjxeznoig\",\"properties\":{\"privateEndpoint\":{\"id\":\"w\"},\"privateLinkServiceConnectionState\":{\"status\":\"kpnb\",\"description\":\"azej\",\"actionsRequired\":\"qkagfhsxt\"},\"provisioningState\":\"ugzxnf\",\"groupIds\":[\"pxdtnkdmkq\",\"jlwuenvrkp\"]}},{\"id\":\"uaibrebqaaysj\",\"name\":\"xqtnq\",\"type\":\"ezl\",\"properties\":{\"privateEndpoint\":{\"id\":\"iakp\"},\"privateLinkServiceConnectionState\":{\"status\":\"qqmtedltmmji\",\"description\":\"yeozphvwauyqncy\",\"actionsRequired\":\"p\"},\"provisioningState\":\"ipmdscwx\",\"groupIds\":[\"evzhfsto\",\"xhojuj\"]}}]},\"location\":\"pelmcuvhixbjxyf\",\"tags\":{\"kkbnu\":\"lrcoolsttpki\"},\"id\":\"rywvtylbfpn\",\"name\":\"urdoi\",\"type\":\"iithtywu\"}") .toObject(HybridComputePrivateLinkScopeInner.class); - Assertions.assertEquals("wnwmewzs", model.location()); - Assertions.assertEquals("euzsoi", model.tags().get("judpfrxt")); - Assertions.assertEquals(PublicNetworkAccessType.DISABLED, model.properties().publicNetworkAccess()); + Assertions.assertEquals("pelmcuvhixbjxyf", model.location()); + Assertions.assertEquals("lrcoolsttpki", model.tags().get("kkbnu")); + Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, model.properties().publicNetworkAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HybridComputePrivateLinkScopeInner model = new HybridComputePrivateLinkScopeInner().withLocation("wnwmewzs") - .withTags(mapOf("judpfrxt", "euzsoi", "paxh", "thzvaytdwkqbrqu", "qoaxoruzfgs", "xiilivpdtiirqt", "zwl", - "uyfxrxxleptramxj")) - .withProperties(new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED)); + HybridComputePrivateLinkScopeInner model + = new HybridComputePrivateLinkScopeInner().withLocation("pelmcuvhixbjxyf") + .withTags(mapOf("kkbnu", "lrcoolsttpki")) + .withProperties(new HybridComputePrivateLinkScopeProperties() + .withPublicNetworkAccess(PublicNetworkAccessType.SECURED_BY_PERIMETER)); model = BinaryData.fromObject(model).toObject(HybridComputePrivateLinkScopeInner.class); - Assertions.assertEquals("wnwmewzs", model.location()); - Assertions.assertEquals("euzsoi", model.tags().get("judpfrxt")); - Assertions.assertEquals(PublicNetworkAccessType.DISABLED, model.properties().publicNetworkAccess()); + Assertions.assertEquals("pelmcuvhixbjxyf", model.location()); + Assertions.assertEquals("lrcoolsttpki", model.tags().get("kkbnu")); + Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, model.properties().publicNetworkAccess()); } // Use "Map.of" if available 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 index c769466a8a552..5de5887226eac 100644 --- 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 @@ -18,39 +18,40 @@ public final class HybridComputePrivateLinkScopeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HybridComputePrivateLinkScopeListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"lvmbmpaxmodfvuef\",\"privateLinkScopeId\":\"sbpfvmwyhr\",\"privateEndpointConnections\":[{\"id\":\"ft\",\"name\":\"kcpwiy\",\"type\":\"qtmnubexkpzk\",\"properties\":{}},{\"id\":\"ndjmquxvyp\",\"name\":\"gkopkwhojvpajqgx\",\"type\":\"mocmbqfqvmk\",\"properties\":{}}]},\"location\":\"zapvhelx\",\"tags\":{\"dd\":\"lya\",\"rjxgciqib\":\"kcbcue\",\"sdqrhzoymibmrq\":\"hos\",\"dtmhrkwofyyvoqa\":\"ibahwflus\"},\"id\":\"piexpbtgiw\",\"name\":\"wo\",\"type\":\"nwashrtd\"},{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"xwbpokulpiuj\",\"privateLinkScopeId\":\"asipqiio\",\"privateEndpointConnections\":[{\"id\":\"erpqlpqwcciuqg\",\"name\":\"butauvfb\",\"type\":\"uwhhmhykojoxafn\",\"properties\":{}},{\"id\":\"pichkoymkcdy\",\"name\":\"pkkpw\",\"type\":\"eqnovvqfovl\",\"properties\":{}},{\"id\":\"wsuwsyr\",\"name\":\"dsytgadgvr\",\"type\":\"aeneqnzarrwl\",\"properties\":{}}]},\"location\":\"ijfqkacewiipfp\",\"tags\":{\"uvksgplsaknynfsy\":\"ibwwiftohqkv\"},\"id\":\"ljphuopxodl\",\"name\":\"iyntorzihle\",\"type\":\"sjswsrms\"},{\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"zbchckqqzqioxiy\",\"privateLinkScopeId\":\"iizynkedyatrwyh\",\"privateEndpointConnections\":[{\"id\":\"zyh\",\"name\":\"tsmypyynpcdp\",\"type\":\"nzgmwznmabik\",\"properties\":{}},{\"id\":\"rgjhxb\",\"name\":\"tlwwrlk\",\"type\":\"tncvokot\",\"properties\":{}},{\"id\":\"d\",\"name\":\"gsyocogj\",\"type\":\"dtbnnha\",\"properties\":{}}]},\"location\":\"crkvcikhnv\",\"tags\":{\"gxk\":\"qgxqquezikyw\"},\"id\":\"lla\",\"name\":\"melwuipiccjz\",\"type\":\"z\"}],\"nextLink\":\"gvvcnayrhyr\"}") + "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"zimejzanlfzx\",\"privateLinkScopeId\":\"vrmbzono\",\"privateEndpointConnections\":[{\"id\":\"jq\",\"name\":\"rgz\",\"type\":\"rlazszrnw\",\"properties\":{}},{\"id\":\"ndfpwpj\",\"name\":\"wbtlhflsjcdh\",\"type\":\"fjvfbgofeljagr\",\"properties\":{}},{\"id\":\"hldvriii\",\"name\":\"nalghfkvtvsexso\",\"type\":\"el\",\"properties\":{}},{\"id\":\"hahhxvrhmzkwpj\",\"name\":\"wspughftqsxhqx\",\"type\":\"xukndxdigr\",\"properties\":{}}]},\"location\":\"ufzdmsyq\",\"tags\":{\"phoszqz\":\"hwhbotzingamv\",\"kfwynw\":\"dphqamv\",\"tnvyqiatkzwp\":\"vtbvkayh\",\"vvsccyajguq\":\"npwzcjaes\"},\"id\":\"hwyg\",\"name\":\"lvdnkfx\",\"type\":\"semdwzrmu\"},{\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"qdpsqxqvpsvu\",\"privateLinkScopeId\":\"mgccelvezrypq\",\"privateEndpointConnections\":[{\"id\":\"okerqwkyhkobop\",\"name\":\"edkowepbqpcrfk\",\"type\":\"ccsnjvcdwxlpq\",\"properties\":{}}]},\"location\":\"tn\",\"tags\":{\"dhtmdvypgikd\":\"jsyingwfqatm\",\"hlhkjoqrvqqaatj\":\"szywkbirryu\"},\"id\":\"nrvgoupmfiibfgg\",\"name\":\"ioolvrwxkvtkkgll\",\"type\":\"wjygvjayvblmhvk\"},{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"vvyhg\",\"privateLinkScopeId\":\"pbyrqufegxu\",\"privateEndpointConnections\":[{\"id\":\"bnhlmc\",\"name\":\"p\",\"type\":\"gitvg\",\"properties\":{}}]},\"location\":\"rixkwmyijejve\",\"tags\":{\"xhcexdrrvqahq\":\"bpnaixexccbdre\",\"jnhyjsvf\":\"ghtpw\",\"mtg\":\"cxzbfvoowvr\",\"y\":\"qp\"},\"id\":\"s\",\"name\":\"ronzmyhgfip\",\"type\":\"sxkm\"}],\"nextLink\":\"a\"}") .toObject(HybridComputePrivateLinkScopeListResult.class); - Assertions.assertEquals("zapvhelx", model.value().get(0).location()); - Assertions.assertEquals("lya", model.value().get(0).tags().get("dd")); + Assertions.assertEquals("ufzdmsyq", model.value().get(0).location()); + Assertions.assertEquals("hwhbotzingamv", model.value().get(0).tags().get("phoszqz")); Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals("gvvcnayrhyr", model.nextLink()); + Assertions.assertEquals("a", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HybridComputePrivateLinkScopeListResult model = new HybridComputePrivateLinkScopeListResult() - .withValue(Arrays.asList( - new HybridComputePrivateLinkScopeInner().withLocation("zapvhelx") - .withTags(mapOf("dd", "lya", "rjxgciqib", "kcbcue", "sdqrhzoymibmrq", "hos", "dtmhrkwofyyvoqa", - "ibahwflus")) + HybridComputePrivateLinkScopeListResult model + = new HybridComputePrivateLinkScopeListResult().withValue(Arrays.asList( + new HybridComputePrivateLinkScopeInner().withLocation("ufzdmsyq") + .withTags(mapOf("phoszqz", "hwhbotzingamv", "kfwynw", "dphqamv", "tnvyqiatkzwp", "vtbvkayh", + "vvsccyajguq", "npwzcjaes")) .withProperties(new HybridComputePrivateLinkScopeProperties() .withPublicNetworkAccess(PublicNetworkAccessType.SECURED_BY_PERIMETER)), - new HybridComputePrivateLinkScopeInner().withLocation("ijfqkacewiipfp") - .withTags(mapOf("uvksgplsaknynfsy", "ibwwiftohqkv")) + new HybridComputePrivateLinkScopeInner().withLocation("tn") + .withTags(mapOf("dhtmdvypgikd", "jsyingwfqatm", "hlhkjoqrvqqaatj", "szywkbirryu")) .withProperties(new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.ENABLED)), - new HybridComputePrivateLinkScopeInner().withLocation("crkvcikhnv") - .withTags(mapOf("gxk", "qgxqquezikyw")) + .withPublicNetworkAccess(PublicNetworkAccessType.SECURED_BY_PERIMETER)), + new HybridComputePrivateLinkScopeInner().withLocation("rixkwmyijejve") + .withTags( + mapOf("xhcexdrrvqahq", "bpnaixexccbdre", "jnhyjsvf", "ghtpw", "mtg", "cxzbfvoowvr", "y", "qp")) .withProperties(new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.SECURED_BY_PERIMETER)))) - .withNextLink("gvvcnayrhyr"); + .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED)))) + .withNextLink("a"); model = BinaryData.fromObject(model).toObject(HybridComputePrivateLinkScopeListResult.class); - Assertions.assertEquals("zapvhelx", model.value().get(0).location()); - Assertions.assertEquals("lya", model.value().get(0).tags().get("dd")); + Assertions.assertEquals("ufzdmsyq", model.value().get(0).location()); + Assertions.assertEquals("hwhbotzingamv", model.value().get(0).tags().get("phoszqz")); Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals("gvvcnayrhyr", model.nextLink()); + Assertions.assertEquals("a", model.nextLink()); } // Use "Map.of" if available 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 index 8eccdde6bd8b6..e9fbad949f555 100644 --- 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 @@ -13,16 +13,16 @@ public final class HybridComputePrivateLinkScopePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { HybridComputePrivateLinkScopeProperties model = BinaryData.fromString( - "{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"hemms\",\"privateLinkScopeId\":\"dkcrodt\",\"privateEndpointConnections\":[{\"id\":\"wj\",\"name\":\"lt\",\"type\":\"cjvefkdlfo\",\"properties\":{\"privateEndpoint\":{\"id\":\"kfpagao\"},\"privateLinkServiceConnectionState\":{\"status\":\"ulpqblylsyxkqjn\",\"description\":\"jervtia\",\"actionsRequired\":\"sdszue\"},\"provisioningState\":\"sbzkf\",\"groupIds\":[\"yvpnqicvinvkjj\",\"dxrbuukzcle\",\"yhmlwpaztzp\",\"fn\"]}},{\"id\":\"kwyfzqwhxxbuyqax\",\"name\":\"eqz\",\"type\":\"priolx\",\"properties\":{\"privateEndpoint\":{\"id\":\"lt\"},\"privateLinkServiceConnectionState\":{\"status\":\"mncwsobqwcsdb\",\"description\":\"wdcfhucqdpfuv\",\"actionsRequired\":\"sbjjc\"},\"provisioningState\":\"vxb\",\"groupIds\":[\"udutnco\",\"mr\",\"xqtvcofu\"]}},{\"id\":\"lvkgju\",\"name\":\"dknnqvsazn\",\"type\":\"tor\",\"properties\":{\"privateEndpoint\":{\"id\":\"sahmky\"},\"privateLinkServiceConnectionState\":{\"status\":\"rauwjuetaebu\",\"description\":\"u\",\"actionsRequired\":\"movsmzlxwabmqoe\"},\"provisioningState\":\"ifrvtpu\",\"groupIds\":[\"mqlgk\",\"btndo\"]}},{\"id\":\"n\",\"name\":\"jcntuj\",\"type\":\"c\",\"properties\":{\"privateEndpoint\":{\"id\":\"twwaezkojvdcpzf\"},\"privateLinkServiceConnectionState\":{\"status\":\"ouicybxarzgszu\",\"description\":\"oxciqopidoamcio\",\"actionsRequired\":\"khazxkhnzbonlwn\"},\"provisioningState\":\"egokdwbwhkszzcmr\",\"groupIds\":[\"ztvbtqgsfr\",\"oyzko\",\"wtl\",\"nguxawqaldsy\"]}}]}") + "{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"ihwqknfdntwjchr\",\"privateLinkScopeId\":\"oihxumwctondzjlu\",\"privateEndpointConnections\":[{\"id\":\"lwg\",\"name\":\"tsbwtovvtgse\",\"type\":\"qfi\",\"properties\":{\"privateEndpoint\":{\"id\":\"knpirgnepttwq\"},\"privateLinkServiceConnectionState\":{\"status\":\"niffcdmqnroj\",\"description\":\"pij\",\"actionsRequired\":\"rxfrddhc\"},\"provisioningState\":\"tizzronasxif\",\"groupIds\":[\"qyzhf\"]}},{\"id\":\"esgogc\",\"name\":\"onnxkrlgnyhm\",\"type\":\"sxkkg\",\"properties\":{\"privateEndpoint\":{\"id\":\"gh\"},\"privateLinkServiceConnectionState\":{\"status\":\"bdhqxvcxgf\",\"description\":\"pdso\",\"actionsRequired\":\"shrnsvbuswdvz\"},\"provisioningState\":\"bycnunvjsrtkf\",\"groupIds\":[\"opqgikyzirtxdyux\",\"ejnt\",\"sewgioilqukr\",\"dxtqmieoxo\"]}}]}") .toObject(HybridComputePrivateLinkScopeProperties.class); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.publicNetworkAccess()); + Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, model.publicNetworkAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HybridComputePrivateLinkScopeProperties model - = new HybridComputePrivateLinkScopeProperties().withPublicNetworkAccess(PublicNetworkAccessType.ENABLED); + HybridComputePrivateLinkScopeProperties model = new HybridComputePrivateLinkScopeProperties() + .withPublicNetworkAccess(PublicNetworkAccessType.SECURED_BY_PERIMETER); model = BinaryData.fromObject(model).toObject(HybridComputePrivateLinkScopeProperties.class); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.publicNetworkAccess()); + Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, model.publicNetworkAccess()); } } 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 index efc480fb343d3..6f7c007be9506 100644 --- 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 @@ -12,9 +12,9 @@ public final class IdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Identity model - = BinaryData.fromString("{\"principalId\":\"bovpl\",\"tenantId\":\"bhvgy\",\"type\":\"SystemAssigned\"}") - .toObject(Identity.class); + Identity model = BinaryData + .fromString("{\"principalId\":\"gwyzm\",\"tenantId\":\"xongmtsavjcbpwxq\",\"type\":\"SystemAssigned\"}") + .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 index 8e36ea7235252..177cd62850da5 100644 --- 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 @@ -11,18 +11,19 @@ public final class IpAddressTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpAddress model = BinaryData.fromString( - "{\"address\":\"njeputtmrywn\",\"ipAddressVersion\":\"oqftiyqzrnkcq\",\"subnet\":{\"addressPrefix\":\"lwh\"}}") + IpAddress model = BinaryData + .fromString( + "{\"address\":\"hseyvju\",\"ipAddressVersion\":\"tslhspkdeem\",\"subnet\":{\"addressPrefix\":\"mx\"}}") .toObject(IpAddress.class); - Assertions.assertEquals("njeputtmrywn", model.address()); - Assertions.assertEquals("oqftiyqzrnkcq", model.ipAddressVersion()); + Assertions.assertEquals("hseyvju", model.address()); + Assertions.assertEquals("tslhspkdeem", model.ipAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpAddress model = new IpAddress().withAddress("njeputtmrywn").withIpAddressVersion("oqftiyqzrnkcq"); + IpAddress model = new IpAddress().withAddress("hseyvju").withIpAddressVersion("tslhspkdeem"); model = BinaryData.fromObject(model).toObject(IpAddress.class); - Assertions.assertEquals("njeputtmrywn", model.address()); - Assertions.assertEquals("oqftiyqzrnkcq", model.ipAddressVersion()); + Assertions.assertEquals("hseyvju", model.address()); + Assertions.assertEquals("tslhspkdeem", model.ipAddressVersion()); } } 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 index d38808e36c16a..ad72f679d1f81 100644 --- 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 @@ -12,16 +12,16 @@ public final class LicenseProfileMachineInstanceViewSoftwareAssuranceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LicenseProfileMachineInstanceViewSoftwareAssurance model - = BinaryData.fromString("{\"softwareAssuranceCustomer\":false}") + = BinaryData.fromString("{\"softwareAssuranceCustomer\":true}") .toObject(LicenseProfileMachineInstanceViewSoftwareAssurance.class); - Assertions.assertEquals(false, model.softwareAssuranceCustomer()); + Assertions.assertEquals(true, model.softwareAssuranceCustomer()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LicenseProfileMachineInstanceViewSoftwareAssurance model - = new LicenseProfileMachineInstanceViewSoftwareAssurance().withSoftwareAssuranceCustomer(false); + = new LicenseProfileMachineInstanceViewSoftwareAssurance().withSoftwareAssuranceCustomer(true); model = BinaryData.fromObject(model).toObject(LicenseProfileMachineInstanceViewSoftwareAssurance.class); - Assertions.assertEquals(false, model.softwareAssuranceCustomer()); + Assertions.assertEquals(true, 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 index 562540c0a89d9..bbdabc2943959 100644 --- 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 @@ -12,16 +12,16 @@ public final class LicenseProfileUpdatePropertiesSoftwareAssuranceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LicenseProfileUpdatePropertiesSoftwareAssurance model - = BinaryData.fromString("{\"softwareAssuranceCustomer\":false}") + = BinaryData.fromString("{\"softwareAssuranceCustomer\":true}") .toObject(LicenseProfileUpdatePropertiesSoftwareAssurance.class); - Assertions.assertEquals(false, model.softwareAssuranceCustomer()); + Assertions.assertEquals(true, model.softwareAssuranceCustomer()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { LicenseProfileUpdatePropertiesSoftwareAssurance model - = new LicenseProfileUpdatePropertiesSoftwareAssurance().withSoftwareAssuranceCustomer(false); + = new LicenseProfileUpdatePropertiesSoftwareAssurance().withSoftwareAssuranceCustomer(true); model = BinaryData.fromObject(model).toObject(LicenseProfileUpdatePropertiesSoftwareAssurance.class); - Assertions.assertEquals(false, model.softwareAssuranceCustomer()); + Assertions.assertEquals(true, 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 index a49c3730830e8..71fa4085487b2 100644 --- 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 @@ -16,38 +16,38 @@ public final class LicenseProfileUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LicenseProfileUpdateProperties model = BinaryData.fromString( - "{\"softwareAssurance\":{\"softwareAssuranceCustomer\":false},\"esuProfile\":{\"assignedLicense\":\"pnvjtoqnermclf\"},\"productProfile\":{\"subscriptionStatus\":\"Enable\",\"productType\":\"WindowsServer\",\"productFeatures\":[{\"name\":\"rpabg\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"bjtazqugxywpmu\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"zwfqkqujidsuyon\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"aocqxtccmgy\",\"subscriptionStatus\":\"Enable\"}]}}") + "{\"softwareAssurance\":{\"softwareAssuranceCustomer\":true},\"esuProfile\":{\"assignedLicense\":\"aboekqv\"},\"productProfile\":{\"subscriptionStatus\":\"Disable\",\"productType\":\"WindowsServer\",\"productFeatures\":[{\"name\":\"wyjsflhhcaalnjix\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"awjoyaqcslyjp\",\"subscriptionStatus\":\"Disable\"},{\"name\":\"zyexzn\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"hnrztfol\",\"subscriptionStatus\":\"Disable\"}]}}") .toObject(LicenseProfileUpdateProperties.class); - Assertions.assertEquals(false, model.softwareAssuranceCustomer()); - Assertions.assertEquals("pnvjtoqnermclf", model.assignedLicense()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); + Assertions.assertEquals(true, model.softwareAssuranceCustomer()); + Assertions.assertEquals("aboekqv", model.assignedLicense()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); - Assertions.assertEquals("rpabg", model.productFeatures().get(0).name()); + Assertions.assertEquals("wyjsflhhcaalnjix", 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("pnvjtoqnermclf") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE) + LicenseProfileUpdateProperties model = new LicenseProfileUpdateProperties().withSoftwareAssuranceCustomer(true) + .withAssignedLicense("aboekqv") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE) .withProductType(LicenseProfileProductType.WINDOWS_SERVER) .withProductFeatures(Arrays.asList( - new ProductFeatureUpdate().withName("rpabg") + new ProductFeatureUpdate().withName("wyjsflhhcaalnjix") .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE), - new ProductFeatureUpdate().withName("bjtazqugxywpmu") + new ProductFeatureUpdate().withName("awjoyaqcslyjp") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE), + new ProductFeatureUpdate().withName("zyexzn") .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE), - new ProductFeatureUpdate().withName("zwfqkqujidsuyon") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE), - new ProductFeatureUpdate().withName("aocqxtccmgy") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE))); + new ProductFeatureUpdate().withName("hnrztfol") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE))); model = BinaryData.fromObject(model).toObject(LicenseProfileUpdateProperties.class); - Assertions.assertEquals(false, model.softwareAssuranceCustomer()); - Assertions.assertEquals("pnvjtoqnermclf", model.assignedLicense()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); + Assertions.assertEquals(true, model.softwareAssuranceCustomer()); + Assertions.assertEquals("aboekqv", model.assignedLicense()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); - Assertions.assertEquals("rpabg", model.productFeatures().get(0).name()); + Assertions.assertEquals("wyjsflhhcaalnjix", 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 index 910eaaf207d11..fc92d9eef0670 100644 --- 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 @@ -18,41 +18,38 @@ public final class LicenseProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LicenseProfileUpdate model = BinaryData.fromString( - "{\"properties\":{\"softwareAssurance\":{\"softwareAssuranceCustomer\":false},\"esuProfile\":{\"assignedLicense\":\"yqupedeojnabckh\"},\"productProfile\":{\"subscriptionStatus\":\"Disable\",\"productType\":\"WindowsIoTEnterprise\",\"productFeatures\":[{\"name\":\"tfhvpesapskrdqmh\",\"subscriptionStatus\":\"Disable\"},{\"name\":\"tldwkyzxuutk\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"cwsvlxotog\",\"subscriptionStatus\":\"Disable\"}]}},\"tags\":{\"nmic\":\"qsx\",\"fcnj\":\"kvceoveilovnotyf\",\"nxdhbt\":\"k\"}}") + "{\"properties\":{\"softwareAssurance\":{\"softwareAssuranceCustomer\":false},\"esuProfile\":{\"assignedLicense\":\"lmwlxkvugfhzo\"},\"productProfile\":{\"subscriptionStatus\":\"Disable\",\"productType\":\"WindowsServer\",\"productFeatures\":[{\"name\":\"uthnnprnxipeilpj\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"jxdultskzbbtdzu\",\"subscriptionStatus\":\"Enable\"}]}},\"tags\":{\"zuhkfpbsjyof\":\"gpw\",\"us\":\"xl\"}}") .toObject(LicenseProfileUpdate.class); - Assertions.assertEquals("qsx", model.tags().get("nmic")); + Assertions.assertEquals("gpw", model.tags().get("zuhkfpbsjyof")); Assertions.assertEquals(false, model.softwareAssuranceCustomer()); - Assertions.assertEquals("yqupedeojnabckh", model.assignedLicense()); + Assertions.assertEquals("lmwlxkvugfhzo", model.assignedLicense()); Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); - Assertions.assertEquals(LicenseProfileProductType.WINDOWS_IO_TENTERPRISE, model.productType()); - Assertions.assertEquals("tfhvpesapskrdqmh", model.productFeatures().get(0).name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); + Assertions.assertEquals("uthnnprnxipeilpj", 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("nmic", "qsx", "fcnj", "kvceoveilovnotyf", "nxdhbt", "k")) - .withSoftwareAssuranceCustomer(false) - .withAssignedLicense("yqupedeojnabckh") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE) - .withProductType(LicenseProfileProductType.WINDOWS_IO_TENTERPRISE) - .withProductFeatures(Arrays.asList( - new ProductFeatureUpdate().withName("tfhvpesapskrdqmh") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE), - new ProductFeatureUpdate().withName("tldwkyzxuutk") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE), - new ProductFeatureUpdate().withName("cwsvlxotog") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE))); + LicenseProfileUpdate model = new LicenseProfileUpdate().withTags(mapOf("zuhkfpbsjyof", "gpw", "us", "xl")) + .withSoftwareAssuranceCustomer(false) + .withAssignedLicense("lmwlxkvugfhzo") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE) + .withProductType(LicenseProfileProductType.WINDOWS_SERVER) + .withProductFeatures(Arrays.asList( + new ProductFeatureUpdate().withName("uthnnprnxipeilpj") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE), + new ProductFeatureUpdate().withName("jxdultskzbbtdzu") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE))); model = BinaryData.fromObject(model).toObject(LicenseProfileUpdate.class); - Assertions.assertEquals("qsx", model.tags().get("nmic")); + Assertions.assertEquals("gpw", model.tags().get("zuhkfpbsjyof")); Assertions.assertEquals(false, model.softwareAssuranceCustomer()); - Assertions.assertEquals("yqupedeojnabckh", model.assignedLicense()); + Assertions.assertEquals("lmwlxkvugfhzo", model.assignedLicense()); Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); - Assertions.assertEquals(LicenseProfileProductType.WINDOWS_IO_TENTERPRISE, model.productType()); - Assertions.assertEquals("tfhvpesapskrdqmh", model.productFeatures().get(0).name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); + Assertions.assertEquals("uthnnprnxipeilpj", 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/LicensesCreateOrUpdateMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateMockTests.java index 563af43becb44..3411640b82163 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 @@ -32,7 +32,7 @@ public final class LicensesCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"nzqodfvpg\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":1170150782,\"assignedLicenses\":2131890526,\"immutableId\":\"zflbqvg\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 2\",\"invoiceId\":\"fcq\"}]}},\"location\":\"rdve\",\"tags\":{\"uzhyrmewipmvekdx\":\"sdtutnwlduyc\",\"zhhzjhfjmhvvmu\":\"kuqgsjjxundxgket\",\"yihsasbhudypohyu\":\"gpmuneqsxvmhfbuz\"},\"id\":\"ms\",\"name\":\"ynsqyrpfoobr\",\"type\":\"ttymsjny\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"eokbze\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Standard\",\"type\":\"pCore\",\"processors\":1208921361,\"assignedLicenses\":2056787,\"immutableId\":\"bkwvzg\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 1\",\"invoiceId\":\"zdix\"}]}},\"location\":\"q\",\"tags\":{\"wopqhewjptmcgs\":\"d\",\"mzlbiojlvfhrb\":\"ostzelndlatu\",\"qvcww\":\"pn\",\"mo\":\"yurmochpprprs\"},\"id\":\"ayzejnhlbkpbz\",\"name\":\"cpilj\",\"type\":\"a\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -42,33 +42,36 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); License response = manager.licenses() - .define("cse") - .withRegion("mbcxfhbcp") - .withExistingResourceGroup("aaomylweazu") - .withTags(mapOf("cja", "vxcjzhqizxfpxtgq", "qaz", "ftjuh")) - .withTenantId("pjhlf") + .define("vmqfoud") + .withRegion("ky") + .withExistingResourceGroup("hnmgixhcm") + .withTags(mapOf("sgqcwdho", "ysi", "fcohdxbzlmcmu", "sdtmcdzs")) + .withTenantId("yyprotwyp") .withLicenseType(LicenseType.ESU) - .withLicenseDetails(new LicenseDetails().withState(LicenseState.DEACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.STANDARD) - .withType(LicenseCoreType.V_CORE) - .withProcessors(1658070092) - .withVolumeLicenseDetails(Arrays - .asList(new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_1).withInvoiceId("xhdjhl")))) + .withLicenseDetails(new LicenseDetails().withState(LicenseState.ACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) + .withEdition(LicenseEdition.DATACENTER) + .withType(LicenseCoreType.P_CORE) + .withProcessors(914185865) + .withVolumeLicenseDetails(Arrays.asList( + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("dtzfjltfvnzcy"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("p"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("pbdbzqgqqi"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("vqwt")))) .create(); - Assertions.assertEquals("rdve", response.location()); - Assertions.assertEquals("sdtutnwlduyc", response.tags().get("uzhyrmewipmvekdx")); - Assertions.assertEquals("nzqodfvpg", response.tenantId()); + Assertions.assertEquals("q", response.location()); + Assertions.assertEquals("d", response.tags().get("wopqhewjptmcgs")); + Assertions.assertEquals("eokbze", 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.DATACENTER, response.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, response.licenseDetails().type()); - Assertions.assertEquals(1170150782, response.licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_2, + Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, response.licenseDetails().target()); + Assertions.assertEquals(LicenseEdition.STANDARD, response.licenseDetails().edition()); + Assertions.assertEquals(LicenseCoreType.P_CORE, response.licenseDetails().type()); + Assertions.assertEquals(1208921361, response.licenseDetails().processors()); + Assertions.assertEquals(ProgramYear.YEAR_1, response.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("fcq", response.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); + Assertions.assertEquals("zdix", 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 85431b366f4bd..045069fa1cef5 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.licenses().delete("isofieypefojyqd", "cuplcplcwkhih", com.azure.core.util.Context.NONE); + manager.licenses().delete("rzpgep", "tybbwwpgda", 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 ede52ed361de6..82354e0bd545f 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 @@ -27,7 +27,7 @@ public final class LicensesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Accepted\",\"tenantId\":\"bunzozudh\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":1904472040,\"assignedLicenses\":1002212342,\"immutableId\":\"dnbzydvfvfcjn\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 2\",\"invoiceId\":\"vhmgorffukis\"},{\"programYear\":\"Year 1\",\"invoiceId\":\"zhwplefaxvxilc\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"hnze\"},{\"programYear\":\"Year 2\",\"invoiceId\":\"jjfzqlqhycavo\"}]}},\"location\":\"gxdbeesmie\",\"tags\":{\"iaa\":\"ra\",\"agt\":\"iuagydwqfbylyrfg\",\"zjvusfzldmo\":\"ojocqwogf\"},\"id\":\"uxylfsbtkadpy\",\"name\":\"own\",\"type\":\"tgkbugrjqctojc\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"vuanashcxlp\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":2095946053,\"assignedLicenses\":665475568,\"immutableId\":\"db\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 1\",\"invoiceId\":\"nfdgn\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"puuw\"}]}},\"location\":\"tvuqjctzenkeifzz\",\"tags\":{\"hbxcu\":\"dasvfl\",\"boldforobwj\":\"chxgs\",\"vacqpbtuodxesz\":\"vizbfhfo\",\"rrwoycqucwyhahn\":\"bbelawumuaslzk\"},\"id\":\"mdr\",\"name\":\"ywuhpsvfuur\",\"type\":\"tlwexxwlalniexz\"}"; 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("", "", AzureEnvironment.AZURE)); License response = manager.licenses() - .getByResourceGroupWithResponse("roud", "spave", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("k", "reljeamur", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gxdbeesmie", response.location()); - Assertions.assertEquals("ra", response.tags().get("iaa")); - Assertions.assertEquals("bunzozudh", response.tenantId()); + Assertions.assertEquals("tvuqjctzenkeifzz", response.location()); + Assertions.assertEquals("dasvfl", response.tags().get("hbxcu")); + Assertions.assertEquals("vuanashcxlp", 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_R2, response.licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.STANDARD, response.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, response.licenseDetails().type()); - Assertions.assertEquals(1904472040, response.licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_2, + Assertions.assertEquals(LicenseEdition.DATACENTER, response.licenseDetails().edition()); + Assertions.assertEquals(LicenseCoreType.P_CORE, response.licenseDetails().type()); + Assertions.assertEquals(2095946053, response.licenseDetails().processors()); + Assertions.assertEquals(ProgramYear.YEAR_1, response.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("vhmgorffukis", response.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); + Assertions.assertEquals("nfdgn", 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 f493db863fdf2..05a74e83d3dd3 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 @@ -28,7 +28,7 @@ public final class LicensesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"tenantId\":\"gmvecactxmw\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":2012349049,\"assignedLicenses\":912689241,\"immutableId\":\"qo\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 2\",\"invoiceId\":\"pjwyiv\"},{\"programYear\":\"Year 2\",\"invoiceId\":\"xcvhrfs\"},{\"programYear\":\"Year 1\",\"invoiceId\":\"grttikteusqczk\"}]}},\"location\":\"klxubyja\",\"tags\":{\"ibrta\":\"mfblcqcuubg\",\"lqxihhrmooiz\":\"metttwgd\",\"y\":\"seypxiutcxapz\",\"lhvnhlab\":\"petogebjox\"},\"id\":\"q\",\"name\":\"kkzjcjbtrga\",\"type\":\"hvv\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"tenantId\":\"bn\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":790882759,\"assignedLicenses\":1670220024,\"immutableId\":\"psttexoq\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 1\",\"invoiceId\":\"ufmhrunc\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"spkcdqzh\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"dunqnd\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"hrqbnjjrcg\"}]}},\"location\":\"ydcwboxjumv\",\"tags\":{\"tloqxfuojrn\":\"lihrraiouaubr\",\"mzdlyjdfqwmkyo\":\"iflrzpasccbiu\"},\"id\":\"ufdvruz\",\"name\":\"lzo\",\"type\":\"hpc\"}]}"; 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("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.licenses().listByResourceGroup("hlhzdsqtzbsrgno", com.azure.core.util.Context.NONE); + = manager.licenses().listByResourceGroup("chzyvlixqnrk", com.azure.core.util.Context.NONE); - Assertions.assertEquals("klxubyja", response.iterator().next().location()); - Assertions.assertEquals("mfblcqcuubg", response.iterator().next().tags().get("ibrta")); - Assertions.assertEquals("gmvecactxmw", response.iterator().next().tenantId()); + Assertions.assertEquals("ydcwboxjumv", response.iterator().next().location()); + Assertions.assertEquals("lihrraiouaubr", response.iterator().next().tags().get("tloqxfuojrn")); + Assertions.assertEquals("bn", response.iterator().next().tenantId()); Assertions.assertEquals(LicenseType.ESU, response.iterator().next().licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, response.iterator().next().licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, + Assertions.assertEquals(LicenseState.ACTIVATED, response.iterator().next().licenseDetails().state()); + Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, 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(2012349049, response.iterator().next().licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_2, + Assertions.assertEquals(LicenseCoreType.V_CORE, response.iterator().next().licenseDetails().type()); + Assertions.assertEquals(790882759, response.iterator().next().licenseDetails().processors()); + Assertions.assertEquals(ProgramYear.YEAR_1, response.iterator().next().licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("pjwyiv", + Assertions.assertEquals("ufmhrunc", 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 66c24259a6097..5b7c5bad75e94 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 @@ -28,7 +28,7 @@ public final class LicensesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"tenantId\":\"jsto\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":2143901348,\"assignedLicenses\":1574210400,\"immutableId\":\"tidgfcwq\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 1\",\"invoiceId\":\"xzhemjyh\"}]}},\"location\":\"uj\",\"tags\":{\"culkbawpfaj\":\"wkozz\"},\"id\":\"jwltlwtjjgu\",\"name\":\"talhsnvkcdmxzr\",\"type\":\"oaimlnw\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"tenantId\":\"xotngfdguge\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"pCore\",\"processors\":1099098499,\"assignedLicenses\":698820955,\"immutableId\":\"pphoj\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 3\",\"invoiceId\":\"hsgz\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"gomfgbeglq\"},{\"programYear\":\"Year 1\",\"invoiceId\":\"hibetnluankrr\"}]}},\"location\":\"eeebtijvacv\",\"tags\":{\"qqxlajr\":\"z\",\"uyxoaf\":\"wxacevehj\",\"inmfgvxirp\":\"aoqltfaey\",\"prlpy\":\"hriypoqeyhlqhy\"},\"id\":\"nuciqdsmexiit\",\"name\":\"fuxtyasiibmiybnn\",\"type\":\"stgnl\"}]}"; 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("uj", response.iterator().next().location()); - Assertions.assertEquals("wkozz", response.iterator().next().tags().get("culkbawpfaj")); - Assertions.assertEquals("jsto", response.iterator().next().tenantId()); + Assertions.assertEquals("eeebtijvacv", response.iterator().next().location()); + Assertions.assertEquals("z", response.iterator().next().tags().get("qqxlajr")); + Assertions.assertEquals("xotngfdguge", 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(2143901348, response.iterator().next().licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_1, + Assertions.assertEquals(LicenseCoreType.P_CORE, response.iterator().next().licenseDetails().type()); + Assertions.assertEquals(1099098499, response.iterator().next().licenseDetails().processors()); + Assertions.assertEquals(ProgramYear.YEAR_3, response.iterator().next().licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("xzhemjyh", + Assertions.assertEquals("hsgz", response.iterator().next().licenseDetails().volumeLicenseDetails().get(0).invoiceId()); } } 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 42adebba2b33a..2db01b5cea250 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 @@ -33,7 +33,7 @@ public final class LicensesValidateLicenseMockTests { @Test public void testValidateLicense() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"dz\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":1770480211,\"assignedLicenses\":496304877,\"immutableId\":\"p\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 2\",\"invoiceId\":\"vyl\"},{\"programYear\":\"Year 2\",\"invoiceId\":\"vluwmncsttij\"}]}},\"location\":\"bvpoekrsgsgbdhu\",\"tags\":{\"zvhxnk\":\"njdgkynscliq\",\"bo\":\"mtk\",\"hihfrbbcevqagtlt\":\"ppnvdxz\",\"vgtrdcnifmzzs\":\"hlfkqojpy\"},\"id\":\"ymbrnysuxmpraf\",\"name\":\"g\",\"type\":\"khocxvdfffwaf\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"wyxebeybpmzz\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":528448638,\"assignedLicenses\":915873133,\"immutableId\":\"aqh\",\"volumeLicenseDetails\":[{\"programYear\":\"Year 3\",\"invoiceId\":\"qyrxp\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"qlsismjqfrddg\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"hiosrsjuiv\"},{\"programYear\":\"Year 3\",\"invoiceId\":\"syirnx\"}]}},\"location\":\"czexrxzbujrtrhqv\",\"tags\":{\"gnl\":\"vk\"},\"id\":\"zonzlrpiqywnc\",\"name\":\"jtszcof\",\"type\":\"zehtdhgb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -44,32 +44,34 @@ public void testValidateLicense() throws Exception { License response = manager.licenses() .validateLicense( - new LicenseInner().withLocation("lqtmldgxob") - .withTags(mapOf("yzriykhy", "clnpkci", "jlb", "wf")) - .withTenantId("ydzgkrvqeevtoe") + new LicenseInner().withLocation("oohgu") + .withTags(mapOf("olbaemwmdx", "zboyjathwt", "f", "ebwjscjpahlxvea", "qcttadijaeukmrsi", + "xnmwmqtibxyijddt")) + .withTenantId("jpdn") .withLicenseType(LicenseType.ESU) - .withLicenseDetails(new LicenseDetails().withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.STANDARD) + .withLicenseDetails(new LicenseDetails().withState(LicenseState.DEACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) + .withEdition(LicenseEdition.DATACENTER) .withType(LicenseCoreType.V_CORE) - .withProcessors(111539193) + .withProcessors(2002582337) .withVolumeLicenseDetails(Arrays.asList( - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("riglaec"), - new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("icokpv")))), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("jme"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_2).withInvoiceId("tvasy"), + new VolumeLicenseDetails().withProgramYear(ProgramYear.YEAR_3).withInvoiceId("zaum")))), com.azure.core.util.Context.NONE); - Assertions.assertEquals("bvpoekrsgsgbdhu", response.location()); - Assertions.assertEquals("njdgkynscliq", response.tags().get("zvhxnk")); - Assertions.assertEquals("dz", response.tenantId()); + Assertions.assertEquals("czexrxzbujrtrhqv", response.location()); + Assertions.assertEquals("vk", response.tags().get("gnl")); + Assertions.assertEquals("wyxebeybpmzz", 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(LicenseTarget.WINDOWS_SERVER_2012_R2, response.licenseDetails().target()); Assertions.assertEquals(LicenseEdition.DATACENTER, response.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, response.licenseDetails().type()); - Assertions.assertEquals(1770480211, response.licenseDetails().processors()); - Assertions.assertEquals(ProgramYear.YEAR_2, + Assertions.assertEquals(LicenseCoreType.V_CORE, response.licenseDetails().type()); + Assertions.assertEquals(528448638, response.licenseDetails().processors()); + Assertions.assertEquals(ProgramYear.YEAR_3, response.licenseDetails().volumeLicenseDetails().get(0).programYear()); - Assertions.assertEquals("vyl", response.licenseDetails().volumeLicenseDetails().get(0).invoiceId()); + Assertions.assertEquals("qyrxp", 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 index e290b7a0a518c..e1cf37f5a620e 100644 --- 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 @@ -14,22 +14,22 @@ public final class LinuxParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { LinuxParameters model = BinaryData.fromString( - "{\"classificationsToInclude\":[\"Critical\"],\"packageNameMasksToInclude\":[\"wndnhj\"],\"packageNameMasksToExclude\":[\"whvylw\",\"btdhxujznbm\",\"ow\",\"wpr\"]}") + "{\"classificationsToInclude\":[\"Critical\"],\"packageNameMasksToInclude\":[\"bsrfbj\",\"dtws\",\"otftpvjzbexilz\",\"nfqqnvwp\"],\"packageNameMasksToExclude\":[\"aruoujmkcjhwqyt\",\"r\",\"bnw\"]}") .toObject(LinuxParameters.class); Assertions.assertEquals(VMGuestPatchClassificationLinux.CRITICAL, model.classificationsToInclude().get(0)); - Assertions.assertEquals("wndnhj", model.packageNameMasksToInclude().get(0)); - Assertions.assertEquals("whvylw", model.packageNameMasksToExclude().get(0)); + Assertions.assertEquals("bsrfbj", model.packageNameMasksToInclude().get(0)); + Assertions.assertEquals("aruoujmkcjhwqyt", 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("wndnhj")) - .withPackageNameMasksToExclude(Arrays.asList("whvylw", "btdhxujznbm", "ow", "wpr")); + .withPackageNameMasksToInclude(Arrays.asList("bsrfbj", "dtws", "otftpvjzbexilz", "nfqqnvwp")) + .withPackageNameMasksToExclude(Arrays.asList("aruoujmkcjhwqyt", "r", "bnw")); model = BinaryData.fromObject(model).toObject(LinuxParameters.class); Assertions.assertEquals(VMGuestPatchClassificationLinux.CRITICAL, model.classificationsToInclude().get(0)); - Assertions.assertEquals("wndnhj", model.packageNameMasksToInclude().get(0)); - Assertions.assertEquals("whvylw", model.packageNameMasksToExclude().get(0)); + Assertions.assertEquals("bsrfbj", model.packageNameMasksToInclude().get(0)); + Assertions.assertEquals("aruoujmkcjhwqyt", 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 index 6d16870b7944a..804d0fce9d062 100644 --- 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 @@ -11,26 +11,25 @@ public final class LocationDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LocationData model = BinaryData - .fromString( - "{\"name\":\"obnbdxkqpxokaj\",\"city\":\"npime\",\"district\":\"stxgc\",\"countryOrRegion\":\"dg\"}") + LocationData model = BinaryData.fromString( + "{\"name\":\"nhzgpphrcgyn\",\"city\":\"cpecfvmmcoofs\",\"district\":\"zevgb\",\"countryOrRegion\":\"jqabcypmivkwlzuv\"}") .toObject(LocationData.class); - Assertions.assertEquals("obnbdxkqpxokaj", model.name()); - Assertions.assertEquals("npime", model.city()); - Assertions.assertEquals("stxgc", model.district()); - Assertions.assertEquals("dg", model.countryOrRegion()); + Assertions.assertEquals("nhzgpphrcgyn", model.name()); + Assertions.assertEquals("cpecfvmmcoofs", model.city()); + Assertions.assertEquals("zevgb", model.district()); + Assertions.assertEquals("jqabcypmivkwlzuv", model.countryOrRegion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LocationData model = new LocationData().withName("obnbdxkqpxokaj") - .withCity("npime") - .withDistrict("stxgc") - .withCountryOrRegion("dg"); + LocationData model = new LocationData().withName("nhzgpphrcgyn") + .withCity("cpecfvmmcoofs") + .withDistrict("zevgb") + .withCountryOrRegion("jqabcypmivkwlzuv"); model = BinaryData.fromObject(model).toObject(LocationData.class); - Assertions.assertEquals("obnbdxkqpxokaj", model.name()); - Assertions.assertEquals("npime", model.city()); - Assertions.assertEquals("stxgc", model.district()); - Assertions.assertEquals("dg", model.countryOrRegion()); + Assertions.assertEquals("nhzgpphrcgyn", model.name()); + Assertions.assertEquals("cpecfvmmcoofs", model.city()); + Assertions.assertEquals("zevgb", model.district()); + Assertions.assertEquals("jqabcypmivkwlzuv", 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 index 77a46c20a4ee3..1c616a17a23b8 100644 --- 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 @@ -14,33 +14,34 @@ public final class MachineExtensionUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MachineExtensionUpdateProperties model = BinaryData.fromString( - "{\"forceUpdateTag\":\"jbi\",\"publisher\":\"bpybsrfbjf\",\"type\":\"w\",\"typeHandlerVersion\":\"otftpvjzbexilz\",\"enableAutomaticUpgrade\":true,\"autoUpgradeMinorVersion\":false,\"settings\":{\"ruoujmk\":\"datawpmqt\"},\"protectedSettings\":{\"ervnaenqpehi\":\"datawqytjrybnwjewgdr\",\"mifthnzdnd\":\"datadoy\"}}") + "{\"forceUpdateTag\":\"gk\",\"publisher\":\"lvmbmpaxmodfvuef\",\"type\":\"sbpfvmwyhr\",\"typeHandlerVersion\":\"uyfta\",\"enableAutomaticUpgrade\":false,\"autoUpgradeMinorVersion\":true,\"settings\":{\"ksmond\":\"datazvqtmnubexkp\",\"gkopkwhojvpajqgx\":\"datamquxvypo\"},\"protectedSettings\":{\"vhelxprglyatdd\":\"dataocmbqfqvmkcxoza\",\"rjxgciqib\":\"datakcbcue\",\"sdqrhzoymibmrq\":\"datahos\"}}") .toObject(MachineExtensionUpdateProperties.class); - Assertions.assertEquals("jbi", model.forceUpdateTag()); - Assertions.assertEquals("bpybsrfbjf", model.publisher()); - Assertions.assertEquals("w", model.type()); - Assertions.assertEquals("otftpvjzbexilz", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); - Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); + Assertions.assertEquals("gk", model.forceUpdateTag()); + Assertions.assertEquals("lvmbmpaxmodfvuef", model.publisher()); + Assertions.assertEquals("sbpfvmwyhr", model.type()); + Assertions.assertEquals("uyfta", model.typeHandlerVersion()); + Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertEquals(true, model.autoUpgradeMinorVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineExtensionUpdateProperties model = new MachineExtensionUpdateProperties().withForceUpdateTag("jbi") - .withPublisher("bpybsrfbjf") - .withType("w") - .withTypeHandlerVersion("otftpvjzbexilz") - .withEnableAutomaticUpgrade(true) - .withAutoUpgradeMinorVersion(false) - .withSettings(mapOf("ruoujmk", "datawpmqt")) - .withProtectedSettings(mapOf("ervnaenqpehi", "datawqytjrybnwjewgdr", "mifthnzdnd", "datadoy")); + MachineExtensionUpdateProperties model = new MachineExtensionUpdateProperties().withForceUpdateTag("gk") + .withPublisher("lvmbmpaxmodfvuef") + .withType("sbpfvmwyhr") + .withTypeHandlerVersion("uyfta") + .withEnableAutomaticUpgrade(false) + .withAutoUpgradeMinorVersion(true) + .withSettings(mapOf("ksmond", "datazvqtmnubexkp", "gkopkwhojvpajqgx", "datamquxvypo")) + .withProtectedSettings( + mapOf("vhelxprglyatdd", "dataocmbqfqvmkcxoza", "rjxgciqib", "datakcbcue", "sdqrhzoymibmrq", "datahos")); model = BinaryData.fromObject(model).toObject(MachineExtensionUpdateProperties.class); - Assertions.assertEquals("jbi", model.forceUpdateTag()); - Assertions.assertEquals("bpybsrfbjf", model.publisher()); - Assertions.assertEquals("w", model.type()); - Assertions.assertEquals("otftpvjzbexilz", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); - Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); + Assertions.assertEquals("gk", model.forceUpdateTag()); + Assertions.assertEquals("lvmbmpaxmodfvuef", model.publisher()); + Assertions.assertEquals("sbpfvmwyhr", model.type()); + Assertions.assertEquals("uyfta", model.typeHandlerVersion()); + Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertEquals(true, model.autoUpgradeMinorVersion()); } // Use "Map.of" if available 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 index 0acba56fd21e4..eea07a5844744 100644 --- 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 @@ -14,13 +14,13 @@ public final class MachineExtensionUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MachineExtensionUpdate model = BinaryData.fromString( - "{\"properties\":{\"forceUpdateTag\":\"txmedj\",\"publisher\":\"slynqwwnc\",\"type\":\"zhxgktrmgucn\",\"typeHandlerVersion\":\"kteo\",\"enableAutomaticUpgrade\":false,\"autoUpgradeMinorVersion\":false,\"settings\":{\"gpfqbuace\":\"datad\",\"qeqxo\":\"datapzfqrhhuaoppp\",\"ahzxctobgbk\":\"dataz\",\"mgrcfbu\":\"datamoizpos\"},\"protectedSettings\":{\"xxjyngudivkrtsw\":\"datafqjhhkxbpvjymj\",\"vjfdx\":\"dataxqzvszjfa\",\"qtdo\":\"dataivetvtcq\"}},\"tags\":{\"yslqbhsfx\":\"bxvwv\",\"lmpewwwfbkr\":\"blytk\",\"vshqjohxcr\":\"rn\",\"sub\":\"bfovasrruvwbhsq\"}}") + "{\"properties\":{\"forceUpdateTag\":\"pxebmnzbt\",\"publisher\":\"jpglkfgohdne\",\"type\":\"lfphsdyhtozfikd\",\"typeHandlerVersion\":\"wq\",\"enableAutomaticUpgrade\":false,\"autoUpgradeMinorVersion\":false,\"settings\":{\"hcohfwdsjnk\":\"datalvithhqzonosgg\",\"swacffgdkzz\":\"dataljuti\"},\"protectedSettings\":{\"a\":\"datafvhqc\",\"uflrwd\":\"datalvpnpp\",\"hgw\":\"datahdlxyjrxsagafcn\",\"q\":\"dataapnedgfbcvkc\"}},\"tags\":{\"rhvoods\":\"eqdcv\",\"opcjwvnhd\":\"tbobz\",\"mgxcxrslpm\":\"d\",\"qsluicp\":\"twuoegrpkhjwni\"}}") .toObject(MachineExtensionUpdate.class); - Assertions.assertEquals("bxvwv", model.tags().get("yslqbhsfx")); - Assertions.assertEquals("txmedj", model.forceUpdateTag()); - Assertions.assertEquals("slynqwwnc", model.publisher()); - Assertions.assertEquals("zhxgktrmgucn", model.type()); - Assertions.assertEquals("kteo", model.typeHandlerVersion()); + Assertions.assertEquals("eqdcv", model.tags().get("rhvoods")); + Assertions.assertEquals("pxebmnzbt", model.forceUpdateTag()); + Assertions.assertEquals("jpglkfgohdne", model.publisher()); + Assertions.assertEquals("lfphsdyhtozfikd", model.type()); + Assertions.assertEquals("wq", model.typeHandlerVersion()); Assertions.assertEquals(false, model.enableAutomaticUpgrade()); Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); } @@ -28,23 +28,22 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MachineExtensionUpdate model = new MachineExtensionUpdate() - .withTags(mapOf("yslqbhsfx", "bxvwv", "lmpewwwfbkr", "blytk", "vshqjohxcr", "rn", "sub", "bfovasrruvwbhsq")) - .withForceUpdateTag("txmedj") - .withPublisher("slynqwwnc") - .withType("zhxgktrmgucn") - .withTypeHandlerVersion("kteo") + .withTags(mapOf("rhvoods", "eqdcv", "opcjwvnhd", "tbobz", "mgxcxrslpm", "d", "qsluicp", "twuoegrpkhjwni")) + .withForceUpdateTag("pxebmnzbt") + .withPublisher("jpglkfgohdne") + .withType("lfphsdyhtozfikd") + .withTypeHandlerVersion("wq") .withEnableAutomaticUpgrade(false) .withAutoUpgradeMinorVersion(false) - .withSettings(mapOf("gpfqbuace", "datad", "qeqxo", "datapzfqrhhuaoppp", "ahzxctobgbk", "dataz", "mgrcfbu", - "datamoizpos")) + .withSettings(mapOf("hcohfwdsjnk", "datalvithhqzonosgg", "swacffgdkzz", "dataljuti")) .withProtectedSettings( - mapOf("xxjyngudivkrtsw", "datafqjhhkxbpvjymj", "vjfdx", "dataxqzvszjfa", "qtdo", "dataivetvtcq")); + mapOf("a", "datafvhqc", "uflrwd", "datalvpnpp", "hgw", "datahdlxyjrxsagafcn", "q", "dataapnedgfbcvkc")); model = BinaryData.fromObject(model).toObject(MachineExtensionUpdate.class); - Assertions.assertEquals("bxvwv", model.tags().get("yslqbhsfx")); - Assertions.assertEquals("txmedj", model.forceUpdateTag()); - Assertions.assertEquals("slynqwwnc", model.publisher()); - Assertions.assertEquals("zhxgktrmgucn", model.type()); - Assertions.assertEquals("kteo", model.typeHandlerVersion()); + Assertions.assertEquals("eqdcv", model.tags().get("rhvoods")); + Assertions.assertEquals("pxebmnzbt", model.forceUpdateTag()); + Assertions.assertEquals("jpglkfgohdne", model.publisher()); + Assertions.assertEquals("lfphsdyhtozfikd", model.type()); + Assertions.assertEquals("wq", model.typeHandlerVersion()); Assertions.assertEquals(false, model.enableAutomaticUpgrade()); Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); } 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 index 4438a738e4ddd..d85e44303d292 100644 --- 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 @@ -14,18 +14,21 @@ public final class MachineExtensionUpgradeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MachineExtensionUpgrade model - = BinaryData.fromString("{\"extensionTargets\":{\"tibqdxbxwakb\":{\"targetVersion\":\"gureodkwobdag\"}}}") - .toObject(MachineExtensionUpgrade.class); - Assertions.assertEquals("gureodkwobdag", model.extensionTargets().get("tibqdxbxwakb").targetVersion()); + MachineExtensionUpgrade model = BinaryData.fromString( + "{\"extensionTargets\":{\"e\":{\"targetVersion\":\"fqka\"},\"wwiftohqkvpuv\":{\"targetVersion\":\"ipfpubji\"},\"ynl\":{\"targetVersion\":\"gplsaknynf\"},\"zihleosjswsr\":{\"targetVersion\":\"huopxodlqiynto\"}}}") + .toObject(MachineExtensionUpgrade.class); + Assertions.assertEquals("fqka", model.extensionTargets().get("e").targetVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineExtensionUpgrade model = new MachineExtensionUpgrade().withExtensionTargets( - mapOf("tibqdxbxwakb", new ExtensionTargetProperties().withTargetVersion("gureodkwobdag"))); + MachineExtensionUpgrade model = new MachineExtensionUpgrade() + .withExtensionTargets(mapOf("e", new ExtensionTargetProperties().withTargetVersion("fqka"), "wwiftohqkvpuv", + new ExtensionTargetProperties().withTargetVersion("ipfpubji"), "ynl", + new ExtensionTargetProperties().withTargetVersion("gplsaknynf"), "zihleosjswsr", + new ExtensionTargetProperties().withTargetVersion("huopxodlqiynto"))); model = BinaryData.fromObject(model).toObject(MachineExtensionUpgrade.class); - Assertions.assertEquals("gureodkwobdag", model.extensionTargets().get("tibqdxbxwakb").targetVersion()); + Assertions.assertEquals("fqka", model.extensionTargets().get("e").targetVersion()); } // Use "Map.of" if available 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 577cd606d3709..daa26671476a0 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.machineExtensions().delete("lgorb", "ftpmdtzfjltfv", "zcyjtot", com.azure.core.util.Context.NONE); + manager.machineExtensions().delete("slmot", "ebnfxofvc", "k", 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 index 03458354664a2..acdf58ba7fcf5 100644 --- 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 @@ -20,52 +20,52 @@ public final class MachineInstallPatchesParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MachineInstallPatchesParameters model = BinaryData.fromString( - "{\"maximumDuration\":\"PT28H58M12S\",\"rebootSetting\":\"Always\",\"windowsParameters\":{\"classificationsToInclude\":[\"Definition\"],\"kbNumbersToInclude\":[\"adm\",\"sr\"],\"kbNumbersToExclude\":[\"vxpvgomz\"],\"excludeKbsRequiringReboot\":false,\"maxPatchPublishDate\":\"2021-11-03T15:37:36Z\"},\"linuxParameters\":{\"classificationsToInclude\":[\"Other\",\"Security\",\"Security\"],\"packageNameMasksToInclude\":[\"dawkzbali\",\"urqhaka\",\"hashsfwxosow\",\"xcug\"],\"packageNameMasksToExclude\":[\"ooxdjebwpuc\",\"wfvovbv\",\"euecivyhzceuoj\"]}}") + "{\"maximumDuration\":\"PT63H45M39S\",\"rebootSetting\":\"IfRequired\",\"windowsParameters\":{\"classificationsToInclude\":[\"Critical\",\"Updates\"],\"kbNumbersToInclude\":[\"yngudivk\"],\"kbNumbersToExclude\":[\"wbxqzvszjfau\",\"j\"],\"excludeKbsRequiringReboot\":false,\"maxPatchPublishDate\":\"2021-03-31T08:08:53Z\"},\"linuxParameters\":{\"classificationsToInclude\":[\"Critical\"],\"packageNameMasksToInclude\":[\"qaqtdoqmcbxvwvxy\",\"lqbhsf\",\"obl\"],\"packageNameMasksToExclude\":[\"blmpewww\"]}}") .toObject(MachineInstallPatchesParameters.class); - Assertions.assertEquals(Duration.parse("PT28H58M12S"), model.maximumDuration()); - Assertions.assertEquals(VMGuestPatchRebootSetting.ALWAYS, model.rebootSetting()); - Assertions.assertEquals(VMGuestPatchClassificationWindows.DEFINITION, + Assertions.assertEquals(Duration.parse("PT63H45M39S"), model.maximumDuration()); + Assertions.assertEquals(VMGuestPatchRebootSetting.IF_REQUIRED, model.rebootSetting()); + Assertions.assertEquals(VMGuestPatchClassificationWindows.CRITICAL, model.windowsParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("adm", model.windowsParameters().kbNumbersToInclude().get(0)); - Assertions.assertEquals("vxpvgomz", model.windowsParameters().kbNumbersToExclude().get(0)); + Assertions.assertEquals("yngudivk", model.windowsParameters().kbNumbersToInclude().get(0)); + Assertions.assertEquals("wbxqzvszjfau", model.windowsParameters().kbNumbersToExclude().get(0)); Assertions.assertEquals(false, model.windowsParameters().excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T15:37:36Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T08:08:53Z"), model.windowsParameters().maxPatchPublishDate()); - Assertions.assertEquals(VMGuestPatchClassificationLinux.OTHER, + Assertions.assertEquals(VMGuestPatchClassificationLinux.CRITICAL, model.linuxParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("dawkzbali", model.linuxParameters().packageNameMasksToInclude().get(0)); - Assertions.assertEquals("ooxdjebwpuc", model.linuxParameters().packageNameMasksToExclude().get(0)); + Assertions.assertEquals("qaqtdoqmcbxvwvxy", model.linuxParameters().packageNameMasksToInclude().get(0)); + Assertions.assertEquals("blmpewww", model.linuxParameters().packageNameMasksToExclude().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MachineInstallPatchesParameters model - = new MachineInstallPatchesParameters().withMaximumDuration(Duration.parse("PT28H58M12S")) - .withRebootSetting(VMGuestPatchRebootSetting.ALWAYS) + = new MachineInstallPatchesParameters().withMaximumDuration(Duration.parse("PT63H45M39S")) + .withRebootSetting(VMGuestPatchRebootSetting.IF_REQUIRED) .withWindowsParameters(new WindowsParameters() - .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.DEFINITION)) - .withKbNumbersToInclude(Arrays.asList("adm", "sr")) - .withKbNumbersToExclude(Arrays.asList("vxpvgomz")) + .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.CRITICAL, + VMGuestPatchClassificationWindows.UPDATES)) + .withKbNumbersToInclude(Arrays.asList("yngudivk")) + .withKbNumbersToExclude(Arrays.asList("wbxqzvszjfau", "j")) .withExcludeKbsRequiringReboot(false) - .withMaxPatchPublishDate(OffsetDateTime.parse("2021-11-03T15:37:36Z"))) + .withMaxPatchPublishDate(OffsetDateTime.parse("2021-03-31T08:08:53Z"))) .withLinuxParameters(new LinuxParameters() - .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationLinux.OTHER, - VMGuestPatchClassificationLinux.SECURITY, VMGuestPatchClassificationLinux.SECURITY)) - .withPackageNameMasksToInclude(Arrays.asList("dawkzbali", "urqhaka", "hashsfwxosow", "xcug")) - .withPackageNameMasksToExclude(Arrays.asList("ooxdjebwpuc", "wfvovbv", "euecivyhzceuoj"))); + .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationLinux.CRITICAL)) + .withPackageNameMasksToInclude(Arrays.asList("qaqtdoqmcbxvwvxy", "lqbhsf", "obl")) + .withPackageNameMasksToExclude(Arrays.asList("blmpewww"))); model = BinaryData.fromObject(model).toObject(MachineInstallPatchesParameters.class); - Assertions.assertEquals(Duration.parse("PT28H58M12S"), model.maximumDuration()); - Assertions.assertEquals(VMGuestPatchRebootSetting.ALWAYS, model.rebootSetting()); - Assertions.assertEquals(VMGuestPatchClassificationWindows.DEFINITION, + Assertions.assertEquals(Duration.parse("PT63H45M39S"), model.maximumDuration()); + Assertions.assertEquals(VMGuestPatchRebootSetting.IF_REQUIRED, model.rebootSetting()); + Assertions.assertEquals(VMGuestPatchClassificationWindows.CRITICAL, model.windowsParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("adm", model.windowsParameters().kbNumbersToInclude().get(0)); - Assertions.assertEquals("vxpvgomz", model.windowsParameters().kbNumbersToExclude().get(0)); + Assertions.assertEquals("yngudivk", model.windowsParameters().kbNumbersToInclude().get(0)); + Assertions.assertEquals("wbxqzvszjfau", model.windowsParameters().kbNumbersToExclude().get(0)); Assertions.assertEquals(false, model.windowsParameters().excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-03T15:37:36Z"), + Assertions.assertEquals(OffsetDateTime.parse("2021-03-31T08:08:53Z"), model.windowsParameters().maxPatchPublishDate()); - Assertions.assertEquals(VMGuestPatchClassificationLinux.OTHER, + Assertions.assertEquals(VMGuestPatchClassificationLinux.CRITICAL, model.linuxParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("dawkzbali", model.linuxParameters().packageNameMasksToInclude().get(0)); - Assertions.assertEquals("ooxdjebwpuc", model.linuxParameters().packageNameMasksToExclude().get(0)); + Assertions.assertEquals("qaqtdoqmcbxvwvxy", model.linuxParameters().packageNameMasksToInclude().get(0)); + Assertions.assertEquals("blmpewww", 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 new file mode 100644 index 0000000000000..63668f3616747 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandScriptSourceTests.java @@ -0,0 +1,39 @@ +// 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.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\":\"obqwcsdbnwdcfh\",\"scriptUri\":\"qdpfuvglsbjjca\",\"commandId\":\"xbvtvudu\",\"scriptUriManagedIdentity\":{\"clientId\":\"ormrlxqtvcofudfl\",\"objectId\":\"gj\"}}") + .toObject(MachineRunCommandScriptSource.class); + Assertions.assertEquals("obqwcsdbnwdcfh", model.script()); + Assertions.assertEquals("qdpfuvglsbjjca", model.scriptUri()); + Assertions.assertEquals("xbvtvudu", model.commandId()); + Assertions.assertEquals("ormrlxqtvcofudfl", model.scriptUriManagedIdentity().clientId()); + Assertions.assertEquals("gj", model.scriptUriManagedIdentity().objectId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MachineRunCommandScriptSource model = new MachineRunCommandScriptSource().withScript("obqwcsdbnwdcfh") + .withScriptUri("qdpfuvglsbjjca") + .withCommandId("xbvtvudu") + .withScriptUriManagedIdentity( + new RunCommandManagedIdentity().withClientId("ormrlxqtvcofudfl").withObjectId("gj")); + model = BinaryData.fromObject(model).toObject(MachineRunCommandScriptSource.class); + Assertions.assertEquals("obqwcsdbnwdcfh", model.script()); + Assertions.assertEquals("qdpfuvglsbjjca", model.scriptUri()); + Assertions.assertEquals("xbvtvudu", model.commandId()); + Assertions.assertEquals("ormrlxqtvcofudfl", model.scriptUriManagedIdentity().clientId()); + Assertions.assertEquals("gj", model.scriptUriManagedIdentity().objectId()); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandUpdateTests.java new file mode 100644 index 0000000000000..c0237cf895ede --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandUpdateTests.java @@ -0,0 +1,41 @@ +// 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.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridcompute.models.MachineRunCommandUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class MachineRunCommandUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + MachineRunCommandUpdate model = BinaryData.fromString( + "{\"tags\":{\"egprhptil\":\"iftxfkf\",\"qtgdqohmcwsl\":\"ucb\",\"tpwb\":\"riz\",\"llibphbqzmizak\":\"a\"}}") + .toObject(MachineRunCommandUpdate.class); + Assertions.assertEquals("iftxfkf", model.tags().get("egprhptil")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MachineRunCommandUpdate model = new MachineRunCommandUpdate() + .withTags(mapOf("egprhptil", "iftxfkf", "qtgdqohmcwsl", "ucb", "tpwb", "riz", "llibphbqzmizak", "a")); + model = BinaryData.fromObject(model).toObject(MachineRunCommandUpdate.class); + Assertions.assertEquals("iftxfkf", model.tags().get("egprhptil")); + } + + // 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/MachineUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineUpdateTests.java index 4ccf35d7efd0c..2dc9f4e9b8ac9 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineUpdateTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineUpdateTests.java @@ -26,77 +26,77 @@ public final class MachineUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MachineUpdate model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"ykzkdncjdxo\",\"tenantId\":\"zoggculapz\",\"type\":\"SystemAssigned\"},\"kind\":\"VMware\",\"properties\":{\"locationData\":{\"name\":\"tqxepn\",\"city\":\"b\",\"district\":\"ajlyjtlvofqzhv\",\"countryOrRegion\":\"ibyfmo\"},\"osProfile\":{\"computerName\":\"rkjpvdwxfzwii\",\"windowsConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"Manual\",\"enableHotpatching\":false,\"status\":{\"hotpatchEnablementStatus\":\"Disabled\",\"error\":{}}}},\"linuxConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"AutomaticByOS\",\"enableHotpatching\":true,\"status\":{\"hotpatchEnablementStatus\":\"Disabled\",\"error\":{}}}}},\"cloudMetadata\":{\"provider\":\"eqvldspast\"},\"agentUpgrade\":{\"desiredVersion\":\"kdmflvestmjlx\",\"correlationId\":\"ca171cc5-6f3f-4540-b1c0-2bf299d895fc\",\"enableAutomaticUpgrade\":true,\"lastAttemptDesiredVersion\":\"zapeewchpx\",\"lastAttemptTimestamp\":\"2021-10-07T14:08:42Z\",\"lastAttemptStatus\":\"Failed\",\"lastAttemptMessage\":\"ziycslevufuztck\"},\"parentClusterResourceId\":\"h\",\"privateLinkScopeResourceId\":\"qedcgzulwm\"},\"tags\":{\"rr\":\"z\"}}") + "{\"identity\":{\"principalId\":\"fgsftufqob\",\"tenantId\":\"lnacgcc\",\"type\":\"SystemAssigned\"},\"kind\":\"GCP\",\"properties\":{\"locationData\":{\"name\":\"zvytnrzvuljraaer\",\"city\":\"okqgukkjq\",\"district\":\"broyla\",\"countryOrRegion\":\"ulcdisdosf\"},\"osProfile\":{\"computerName\":\"svgjrwhryvy\",\"windowsConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"AutomaticByOS\",\"enableHotpatching\":true,\"status\":{\"hotpatchEnablementStatus\":\"PendingEvaluation\",\"error\":{}}}},\"linuxConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"Manual\",\"enableHotpatching\":true,\"status\":{\"hotpatchEnablementStatus\":\"Disabled\",\"error\":{}}}}},\"cloudMetadata\":{\"provider\":\"tzaefedx\"},\"agentUpgrade\":{\"desiredVersion\":\"hrphkmcrjdqn\",\"correlationId\":\"925a8657-5228-4442-b942-9cd32232bbe1\",\"enableAutomaticUpgrade\":true,\"lastAttemptDesiredVersion\":\"bg\",\"lastAttemptTimestamp\":\"2020-12-30T22:46:50Z\",\"lastAttemptStatus\":\"Success\",\"lastAttemptMessage\":\"dgh\"},\"parentClusterResourceId\":\"euutlwxezwzh\",\"privateLinkScopeResourceId\":\"vbwnhhtq\"},\"tags\":{\"vgcxtx\":\"hgppipifhpfeoa\",\"smkss\":\"csheafidltugsr\"}}") .toObject(MachineUpdate.class); - Assertions.assertEquals("z", model.tags().get("rr")); + Assertions.assertEquals("hgppipifhpfeoa", model.tags().get("vgcxtx")); Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(ArcKindEnum.VMWARE, model.kind()); - Assertions.assertEquals("tqxepn", model.locationData().name()); - Assertions.assertEquals("b", model.locationData().city()); - Assertions.assertEquals("ajlyjtlvofqzhv", model.locationData().district()); - Assertions.assertEquals("ibyfmo", model.locationData().countryOrRegion()); + Assertions.assertEquals(ArcKindEnum.GCP, model.kind()); + Assertions.assertEquals("zvytnrzvuljraaer", model.locationData().name()); + Assertions.assertEquals("okqgukkjq", model.locationData().city()); + Assertions.assertEquals("broyla", model.locationData().district()); + Assertions.assertEquals("ulcdisdosf", model.locationData().countryOrRegion()); Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.osProfile().windowsConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().windowsConfiguration().patchMode()); - Assertions.assertEquals(false, model.osProfile().windowsConfiguration().enableHotpatching()); + Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.osProfile().windowsConfiguration().patchMode()); + Assertions.assertEquals(true, model.osProfile().windowsConfiguration().enableHotpatching()); Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.osProfile().linuxConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.osProfile().linuxConfiguration().patchMode()); + Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().linuxConfiguration().patchMode()); Assertions.assertEquals(true, model.osProfile().linuxConfiguration().enableHotpatching()); - Assertions.assertEquals("kdmflvestmjlx", model.agentUpgrade().desiredVersion()); - Assertions.assertEquals(UUID.fromString("ca171cc5-6f3f-4540-b1c0-2bf299d895fc"), + Assertions.assertEquals("hrphkmcrjdqn", model.agentUpgrade().desiredVersion()); + Assertions.assertEquals(UUID.fromString("925a8657-5228-4442-b942-9cd32232bbe1"), model.agentUpgrade().correlationId()); Assertions.assertEquals(true, model.agentUpgrade().enableAutomaticUpgrade()); - Assertions.assertEquals("h", model.parentClusterResourceId()); - Assertions.assertEquals("qedcgzulwm", model.privateLinkScopeResourceId()); + Assertions.assertEquals("euutlwxezwzh", model.parentClusterResourceId()); + Assertions.assertEquals("vbwnhhtq", model.privateLinkScopeResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineUpdate model = new MachineUpdate().withTags(mapOf("rr", "z")) + MachineUpdate model = new MachineUpdate().withTags(mapOf("vgcxtx", "hgppipifhpfeoa", "smkss", "csheafidltugsr")) .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withKind(ArcKindEnum.VMWARE) - .withLocationData(new LocationData().withName("tqxepn") - .withCity("b") - .withDistrict("ajlyjtlvofqzhv") - .withCountryOrRegion("ibyfmo")) + .withKind(ArcKindEnum.GCP) + .withLocationData(new LocationData().withName("zvytnrzvuljraaer") + .withCity("okqgukkjq") + .withDistrict("broyla") + .withCountryOrRegion("ulcdisdosf")) .withOsProfile(new OSProfile() .withWindowsConfiguration( new OSProfileWindowsConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) - .withPatchMode(PatchModeTypes.MANUAL) - .withEnableHotpatching(false)) + .withPatchMode(PatchModeTypes.AUTOMATIC_BY_OS) + .withEnableHotpatching(true)) .withLinuxConfiguration( new OSProfileLinuxConfiguration().withAssessmentMode(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM) - .withPatchMode(PatchModeTypes.AUTOMATIC_BY_OS) + .withPatchMode(PatchModeTypes.MANUAL) .withEnableHotpatching(true))) .withCloudMetadata(new CloudMetadata()) - .withAgentUpgrade(new AgentUpgrade().withDesiredVersion("kdmflvestmjlx") - .withCorrelationId(UUID.fromString("ca171cc5-6f3f-4540-b1c0-2bf299d895fc")) + .withAgentUpgrade(new AgentUpgrade().withDesiredVersion("hrphkmcrjdqn") + .withCorrelationId(UUID.fromString("925a8657-5228-4442-b942-9cd32232bbe1")) .withEnableAutomaticUpgrade(true)) - .withParentClusterResourceId("h") - .withPrivateLinkScopeResourceId("qedcgzulwm"); + .withParentClusterResourceId("euutlwxezwzh") + .withPrivateLinkScopeResourceId("vbwnhhtq"); model = BinaryData.fromObject(model).toObject(MachineUpdate.class); - Assertions.assertEquals("z", model.tags().get("rr")); + Assertions.assertEquals("hgppipifhpfeoa", model.tags().get("vgcxtx")); Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(ArcKindEnum.VMWARE, model.kind()); - Assertions.assertEquals("tqxepn", model.locationData().name()); - Assertions.assertEquals("b", model.locationData().city()); - Assertions.assertEquals("ajlyjtlvofqzhv", model.locationData().district()); - Assertions.assertEquals("ibyfmo", model.locationData().countryOrRegion()); + Assertions.assertEquals(ArcKindEnum.GCP, model.kind()); + Assertions.assertEquals("zvytnrzvuljraaer", model.locationData().name()); + Assertions.assertEquals("okqgukkjq", model.locationData().city()); + Assertions.assertEquals("broyla", model.locationData().district()); + Assertions.assertEquals("ulcdisdosf", model.locationData().countryOrRegion()); Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.osProfile().windowsConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().windowsConfiguration().patchMode()); - Assertions.assertEquals(false, model.osProfile().windowsConfiguration().enableHotpatching()); + Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.osProfile().windowsConfiguration().patchMode()); + Assertions.assertEquals(true, model.osProfile().windowsConfiguration().enableHotpatching()); Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.osProfile().linuxConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.osProfile().linuxConfiguration().patchMode()); + Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().linuxConfiguration().patchMode()); Assertions.assertEquals(true, model.osProfile().linuxConfiguration().enableHotpatching()); - Assertions.assertEquals("kdmflvestmjlx", model.agentUpgrade().desiredVersion()); - Assertions.assertEquals(UUID.fromString("ca171cc5-6f3f-4540-b1c0-2bf299d895fc"), + Assertions.assertEquals("hrphkmcrjdqn", model.agentUpgrade().desiredVersion()); + Assertions.assertEquals(UUID.fromString("925a8657-5228-4442-b942-9cd32232bbe1"), model.agentUpgrade().correlationId()); Assertions.assertEquals(true, model.agentUpgrade().enableAutomaticUpgrade()); - Assertions.assertEquals("h", model.parentClusterResourceId()); - Assertions.assertEquals("qedcgzulwm", model.privateLinkScopeResourceId()); + Assertions.assertEquals("euutlwxezwzh", model.parentClusterResourceId()); + Assertions.assertEquals("vbwnhhtq", model.privateLinkScopeResourceId()); } // Use "Map.of" if available diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesDeleteByResourceGroupWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesDeleteByResourceGroupWithResponseMockTests.java index 8d2a7211e78a4..1d2aee7008610 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesDeleteByResourceGroupWithResponseMockTests.java @@ -27,7 +27,7 @@ public void testDeleteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.machines().deleteByResourceGroupWithResponse("qdnfwqzdz", "tilaxh", com.azure.core.util.Context.NONE); + manager.machines().deleteByResourceGroupWithResponse("zv", "chndbnwie", com.azure.core.util.Context.NONE); } } 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 index a7a339b4b6e28..8408ac2556895 100644 --- 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 @@ -14,19 +14,27 @@ public final class NetworkInterfaceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkInterface model = BinaryData.fromString( - "{\"ipAddresses\":[{\"address\":\"jzicwifsjt\",\"ipAddressVersion\":\"zfbishcbkhaj\",\"subnet\":{\"addressPrefix\":\"eamdp\"}},{\"address\":\"g\",\"ipAddressVersion\":\"pbuxwgipwhon\",\"subnet\":{\"addressPrefix\":\"gshwankixz\"}}]}") + "{\"macAddress\":\"qxtccmgyudx\",\"id\":\"lmoyrx\",\"name\":\"fudwpznt\",\"ipAddresses\":[{\"address\":\"hl\",\"ipAddressVersion\":\"jbhckfrlhr\",\"subnet\":{\"addressPrefix\":\"kyv\"}},{\"address\":\"ca\",\"ipAddressVersion\":\"z\",\"subnet\":{\"addressPrefix\":\"kafkuwbcrnwbm\"}}]}") .toObject(NetworkInterface.class); - Assertions.assertEquals("jzicwifsjt", model.ipAddresses().get(0).address()); - Assertions.assertEquals("zfbishcbkhaj", model.ipAddresses().get(0).ipAddressVersion()); + Assertions.assertEquals("qxtccmgyudx", model.macAddress()); + Assertions.assertEquals("lmoyrx", model.id()); + Assertions.assertEquals("fudwpznt", model.name()); + Assertions.assertEquals("hl", model.ipAddresses().get(0).address()); + Assertions.assertEquals("jbhckfrlhr", model.ipAddresses().get(0).ipAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkInterface model = new NetworkInterface().withIpAddresses( - Arrays.asList(new IpAddress().withAddress("jzicwifsjt").withIpAddressVersion("zfbishcbkhaj"), - new IpAddress().withAddress("g").withIpAddressVersion("pbuxwgipwhon"))); + NetworkInterface model = new NetworkInterface().withMacAddress("qxtccmgyudx") + .withId("lmoyrx") + .withName("fudwpznt") + .withIpAddresses(Arrays.asList(new IpAddress().withAddress("hl").withIpAddressVersion("jbhckfrlhr"), + new IpAddress().withAddress("ca").withIpAddressVersion("z"))); model = BinaryData.fromObject(model).toObject(NetworkInterface.class); - Assertions.assertEquals("jzicwifsjt", model.ipAddresses().get(0).address()); - Assertions.assertEquals("zfbishcbkhaj", model.ipAddresses().get(0).ipAddressVersion()); + Assertions.assertEquals("qxtccmgyudx", model.macAddress()); + Assertions.assertEquals("lmoyrx", model.id()); + Assertions.assertEquals("fudwpznt", model.name()); + Assertions.assertEquals("hl", model.ipAddresses().get(0).address()); + Assertions.assertEquals("jbhckfrlhr", model.ipAddresses().get(0).ipAddressVersion()); } } 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 index 1a3bd8998e052..35549b42ee2e7 100644 --- 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 @@ -15,29 +15,52 @@ public final class NetworkProfileInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkProfileInner model = BinaryData.fromString( - "{\"networkInterfaces\":[{\"ipAddresses\":[{\"address\":\"pxjmflbvvnchr\",\"ipAddressVersion\":\"ciwwzjuqkhr\",\"subnet\":{\"addressPrefix\":\"iwkuofos\"}},{\"address\":\"hsauuimjmvxied\",\"ipAddressVersion\":\"gidyjrrf\",\"subnet\":{\"addressPrefix\":\"osvexcsonpclhoc\"}},{\"address\":\"slkevle\",\"ipAddressVersion\":\"zfbuhf\",\"subnet\":{\"addressPrefix\":\"axkffei\"}}]},{\"ipAddresses\":[{\"address\":\"vmezy\",\"ipAddressVersion\":\"hxmzsbbzoggig\",\"subnet\":{\"addressPrefix\":\"burvjxxjnspy\"}}]},{\"ipAddresses\":[{\"address\":\"oenkouknvudwti\",\"ipAddressVersion\":\"bldngkpoc\",\"subnet\":{\"addressPrefix\":\"z\"}}]},{\"ipAddresses\":[{\"address\":\"gukgjnpiucgygevq\",\"ipAddressVersion\":\"typmrbpizcdrqjsd\",\"subnet\":{\"addressPrefix\":\"nfyhx\"}}]}]}") + "{\"networkInterfaces\":[{\"macAddress\":\"tkcxywnytnrsy\",\"id\":\"qidybyx\",\"name\":\"fclhaaxdbabphlwr\",\"ipAddresses\":[{\"address\":\"tsthsucocm\",\"ipAddressVersion\":\"yazttbtwwrqpue\",\"subnet\":{\"addressPrefix\":\"zywbiex\"}}]},{\"macAddress\":\"eyueaxibxujwb\",\"id\":\"walm\",\"name\":\"yoxa\",\"ipAddresses\":[{\"address\":\"zjancuxr\",\"ipAddressVersion\":\"wbavxbniwdj\",\"subnet\":{\"addressPrefix\":\"tsdbpgn\"}},{\"address\":\"txhp\",\"ipAddressVersion\":\"bzpfzab\",\"subnet\":{\"addressPrefix\":\"uhxwtctyqiklbbov\"}},{\"address\":\"wzbhvgyugu\",\"ipAddressVersion\":\"vmkfssxqu\",\"subnet\":{\"addressPrefix\":\"plgmgsxnk\"}}]},{\"macAddress\":\"kde\",\"id\":\"pvlopwiyighxpkd\",\"name\":\"baiuebbaumny\",\"ipAddresses\":[{\"address\":\"deoj\",\"ipAddressVersion\":\"bckhsmtxpsi\",\"subnet\":{\"addressPrefix\":\"fhvpesaps\"}}]},{\"macAddress\":\"dqmh\",\"id\":\"dhtldwkyz\",\"name\":\"utknc\",\"ipAddresses\":[{\"address\":\"svlxotogtwrup\",\"ipAddressVersion\":\"xvnmicykvceov\",\"subnet\":{\"addressPrefix\":\"ovnotyfjfcnjbkcn\"}},{\"address\":\"hbttkphyw\",\"ipAddressVersion\":\"vjtoqnermclfp\",\"subnet\":{\"addressPrefix\":\"oxuscrpabgyepsbj\"}},{\"address\":\"zq\",\"ipAddressVersion\":\"xywpmueefjzwfqkq\",\"subnet\":{\"addressPrefix\":\"dsuyonobgla\"}}]}]}") .toObject(NetworkProfileInner.class); - Assertions.assertEquals("pxjmflbvvnchr", model.networkInterfaces().get(0).ipAddresses().get(0).address()); - Assertions.assertEquals("ciwwzjuqkhr", + Assertions.assertEquals("tkcxywnytnrsy", model.networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("qidybyx", model.networkInterfaces().get(0).id()); + Assertions.assertEquals("fclhaaxdbabphlwr", model.networkInterfaces().get(0).name()); + Assertions.assertEquals("tsthsucocm", model.networkInterfaces().get(0).ipAddresses().get(0).address()); + Assertions.assertEquals("yazttbtwwrqpue", model.networkInterfaces().get(0).ipAddresses().get(0).ipAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkProfileInner model = new NetworkProfileInner().withNetworkInterfaces(Arrays.asList( - new NetworkInterface().withIpAddresses( - Arrays.asList(new IpAddress().withAddress("pxjmflbvvnchr").withIpAddressVersion("ciwwzjuqkhr"), - new IpAddress().withAddress("hsauuimjmvxied").withIpAddressVersion("gidyjrrf"), - new IpAddress().withAddress("slkevle").withIpAddressVersion("zfbuhf"))), - new NetworkInterface().withIpAddresses( - Arrays.asList(new IpAddress().withAddress("vmezy").withIpAddressVersion("hxmzsbbzoggig"))), - new NetworkInterface().withIpAddresses( - Arrays.asList(new IpAddress().withAddress("oenkouknvudwti").withIpAddressVersion("bldngkpoc"))), - new NetworkInterface().withIpAddresses(Arrays - .asList(new IpAddress().withAddress("gukgjnpiucgygevq").withIpAddressVersion("typmrbpizcdrqjsd"))))); + NetworkProfileInner model + = new NetworkProfileInner() + .withNetworkInterfaces( + Arrays.asList( + new NetworkInterface().withMacAddress("tkcxywnytnrsy") + .withId("qidybyx") + .withName("fclhaaxdbabphlwr") + .withIpAddresses(Arrays.asList( + new IpAddress().withAddress("tsthsucocm").withIpAddressVersion("yazttbtwwrqpue"))), + new NetworkInterface().withMacAddress("eyueaxibxujwb") + .withId("walm") + .withName("yoxa") + .withIpAddresses(Arrays + .asList(new IpAddress().withAddress("zjancuxr").withIpAddressVersion("wbavxbniwdj"), + new IpAddress().withAddress("txhp").withIpAddressVersion("bzpfzab"), + new IpAddress().withAddress("wzbhvgyugu").withIpAddressVersion("vmkfssxqu"))), + new NetworkInterface().withMacAddress("kde") + .withId("pvlopwiyighxpkd") + .withName("baiuebbaumny") + .withIpAddresses( + Arrays.asList(new IpAddress().withAddress("deoj").withIpAddressVersion("bckhsmtxpsi"))), + new NetworkInterface().withMacAddress("dqmh") + .withId("dhtldwkyz") + .withName("utknc") + .withIpAddresses(Arrays.asList( + new IpAddress().withAddress("svlxotogtwrup").withIpAddressVersion("xvnmicykvceov"), + new IpAddress().withAddress("hbttkphyw").withIpAddressVersion("vjtoqnermclfp"), + new IpAddress().withAddress("zq").withIpAddressVersion("xywpmueefjzwfqkq"))))); model = BinaryData.fromObject(model).toObject(NetworkProfileInner.class); - Assertions.assertEquals("pxjmflbvvnchr", model.networkInterfaces().get(0).ipAddresses().get(0).address()); - Assertions.assertEquals("ciwwzjuqkhr", + Assertions.assertEquals("tkcxywnytnrsy", model.networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("qidybyx", model.networkInterfaces().get(0).id()); + Assertions.assertEquals("fclhaaxdbabphlwr", model.networkInterfaces().get(0).name()); + Assertions.assertEquals("tsthsucocm", model.networkInterfaces().get(0).ipAddresses().get(0).address()); + Assertions.assertEquals("yazttbtwwrqpue", model.networkInterfaces().get(0).ipAddresses().get(0).ipAddressVersion()); } } 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 4c28a1c214f4d..0ea0979fd7a26 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 @@ -21,7 +21,7 @@ public final class NetworkProfilesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"networkInterfaces\":[{\"ipAddresses\":[{\"address\":\"du\",\"ipAddressVersion\":\"birdsvuwcobiegs\",\"subnet\":{}},{\"address\":\"inwjizcilngh\",\"ipAddressVersion\":\"h\",\"subnet\":{}}]},{\"ipAddresses\":[{\"address\":\"xqmul\",\"ipAddressVersion\":\"lxqzvn\",\"subnet\":{}},{\"address\":\"bycucrwnamikz\",\"ipAddressVersion\":\"rqbsmswziq\",\"subnet\":{}},{\"address\":\"hokzrusw\",\"ipAddressVersion\":\"hczznvf\",\"subnet\":{}}]}]}"; + = "{\"networkInterfaces\":[{\"macAddress\":\"daqaxsi\",\"id\":\"etgbebjfulb\",\"name\":\"ichdlpn\",\"ipAddresses\":[{\"address\":\"nt\",\"ipAddressVersion\":\"atzviqsowsaael\",\"subnet\":{}},{\"address\":\"tc\",\"ipAddressVersion\":\"hplrvkmjcwmjvlg\",\"subnet\":{}},{\"address\":\"cvkyylizrzbj\",\"ipAddressVersion\":\"fxsfuztlvtmv\",\"subnet\":{}},{\"address\":\"w\",\"ipAddressVersion\":\"qlvh\",\"subnet\":{}}]},{\"macAddress\":\"veo\",\"id\":\"zrvjfnmjmvlwyzgi\",\"name\":\"kujrllfojui\",\"ipAddresses\":[{\"address\":\"uyjucejikzo\",\"ipAddressVersion\":\"vvtzejetjkl\",\"subnet\":{}},{\"address\":\"k\",\"ipAddressVersion\":\"uzk\",\"subnet\":{}},{\"address\":\"zolxrzvhqjwtr\",\"ipAddressVersion\":\"gv\",\"subnet\":{}}]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,12 +30,14 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - NetworkProfile response = manager.networkProfiles() - .getWithResponse("epqw", "ixmonstshiyxg", com.azure.core.util.Context.NONE) - .getValue(); + NetworkProfile response + = manager.networkProfiles().getWithResponse("fb", "kwpzdqtvh", com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("du", response.networkInterfaces().get(0).ipAddresses().get(0).address()); - Assertions.assertEquals("birdsvuwcobiegs", + Assertions.assertEquals("daqaxsi", response.networkInterfaces().get(0).macAddress()); + Assertions.assertEquals("etgbebjfulb", response.networkInterfaces().get(0).id()); + Assertions.assertEquals("ichdlpn", response.networkInterfaces().get(0).name()); + Assertions.assertEquals("nt", response.networkInterfaces().get(0).ipAddresses().get(0).address()); + Assertions.assertEquals("atzviqsowsaael", 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 index f0e6c802a8cff..c2e18cf3f3c9d 100644 --- 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 @@ -14,7 +14,7 @@ public final class NetworkSecurityPerimeterConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"bwtovvtgseinqf\",\"provisioningIssues\":[{\"name\":\"qknp\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"twqmsniffcdmqnr\",\"suggestedResourceIds\":[\"pij\",\"k\",\"xfrdd\"],\"suggestedAccessRules\":[{},{}]}},{\"name\":\"tizzronasxif\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"f\",\"suggestedResourceIds\":[\"sgogczhonnxk\",\"lgnyhmo\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"kgthrrghxjbd\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Error\",\"description\":\"frpdsofbshrns\",\"suggestedResourceIds\":[\"swdvzyybycnun\",\"jsrtk\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"opqgikyzirtxdyux\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"ewgioilqukrydxt\",\"suggestedResourceIds\":[\"eoxorggufhyao\",\"tbghhavgrvkf\",\"ovjzhpjbibgjmfx\",\"mv\"],\"suggestedAccessRules\":[{},{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"ovwxnbkfezzxsc\",\"perimeterGuid\":\"wzdgirujbzbo\",\"location\":\"zzbtdcqvpniyujvi\"},\"resourceAssociation\":{\"name\":\"dshf\",\"accessMode\":\"audit\"},\"profile\":{\"name\":\"gy\",\"accessRulesVersion\":692564067,\"accessRules\":[{\"name\":\"gaojf\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"mrfhirctymox\"]}},{\"name\":\"tpipiwyczuhx\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"ihhyuspskasd\",\"lmfwdgzx\",\"lucvpam\",\"sreuzvxurisjnh\"]}}],\"diagnosticSettingsVersion\":1488634157,\"enabledLogCategories\":[\"fq\",\"zgxmr\"]}},\"id\":\"ublwpcesutrg\",\"name\":\"upauut\",\"type\":\"woqhihe\"}") + "{\"properties\":{\"provisioningState\":\"peewchpxlkt\",\"provisioningIssues\":[{\"name\":\"iycslevuf\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"h\",\"suggestedResourceIds\":[\"edcg\",\"ulwm\",\"rqzz\"],\"suggestedAccessRules\":[{},{},{}]}},{\"name\":\"pglydz\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"vtoepryutnw\",\"suggestedResourceIds\":[\"zdmovzv\"],\"suggestedAccessRules\":[{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"zqadf\",\"perimeterGuid\":\"z\",\"location\":\"iglaecx\"},\"resourceAssociation\":{\"name\":\"icokpv\",\"accessMode\":\"enforced\"},\"profile\":{\"name\":\"mldgxobfirc\",\"accessRulesVersion\":563418466,\"accessRules\":[{\"name\":\"ayzri\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"fvjlboxqvkjlmx\"]}},{\"name\":\"mdy\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"gumbnraauzzptja\"]}},{\"name\":\"sdzhezww\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"vv\",\"onkp\"]}}],\"diagnosticSettingsVersion\":1476796114,\"enabledLogCategories\":[\"kvylauyavl\",\"wmn\",\"sttijfybvp\"]}},\"id\":\"ekrsgs\",\"name\":\"b\",\"type\":\"huzqgn\"}") .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 index 05c74477c2045..8807de9cccb06 100644 --- 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 @@ -11,7 +11,7 @@ public final class NetworkSecurityPerimeterConfigurationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"bteoybf\",\"provisioningIssues\":[{\"name\":\"kvvjgslordilmyww\",\"properties\":{}},{\"name\":\"kxn\",\"properties\":{}},{\"name\":\"abgyvudt\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"bcihxuuwhc\",\"perimeterGuid\":\"xccybvpa\",\"location\":\"kkudzp\"},\"resourceAssociation\":{\"name\":\"jplmagstcy\",\"accessMode\":\"audit\"},\"profile\":{\"name\":\"yrkdbdgiogsjkmn\",\"accessRulesVersion\":2043815885,\"accessRules\":[{},{},{},{}],\"diagnosticSettingsVersion\":688364927,\"enabledLogCategories\":[\"hdd\",\"iacegfnmn\"]}},\"id\":\"fpmvmemfnczd\",\"name\":\"vvbalx\",\"type\":\"l\"}],\"nextLink\":\"hpodbzev\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"azkmtgguwp\",\"provisioningIssues\":[{\"name\":\"jcivmmg\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"iwrxgkn\",\"perimeterGuid\":\"vyi\",\"location\":\"qodfvp\"},\"resourceAssociation\":{\"name\":\"oxgsgbpfgzdjtx\",\"accessMode\":\"learning\"},\"profile\":{\"name\":\"q\",\"accessRulesVersion\":879778472,\"accessRules\":[{}],\"diagnosticSettingsVersion\":1448680502,\"enabledLogCategories\":[\"cqusr\"]}},\"id\":\"vetnwsdtutn\",\"name\":\"lduycv\",\"type\":\"zhyrmewipmve\"},{\"properties\":{\"provisioningState\":\"ukuqgsj\",\"provisioningIssues\":[{\"name\":\"dxgketwzhhzjhfj\",\"properties\":{}},{\"name\":\"vmuvgpmu\",\"properties\":{}},{\"name\":\"sx\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"buzjyih\",\"perimeterGuid\":\"sbhud\",\"location\":\"ohyuemslynsq\"},\"resourceAssociation\":{\"name\":\"foobrlttyms\",\"accessMode\":\"audit\"},\"profile\":{\"name\":\"dnfwqzdzg\",\"accessRulesVersion\":362294520,\"accessRules\":[{},{}],\"diagnosticSettingsVersion\":1656596854,\"enabledLogCategories\":[\"qlyvijo\",\"wivkxo\"]}},\"id\":\"zunbixx\",\"name\":\"ti\",\"type\":\"vcpwpgclrc\"},{\"properties\":{\"provisioningState\":\"soxfrken\",\"provisioningIssues\":[{\"name\":\"yefrpmpdnqqska\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"vmm\",\"perimeterGuid\":\"pqfrtqlkz\",\"location\":\"gnitgvkxlzyq\"},\"resourceAssociation\":{\"name\":\"eg\",\"accessMode\":\"audit\"},\"profile\":{\"name\":\"xwh\",\"accessRulesVersion\":1238946257,\"accessRules\":[{}],\"diagnosticSettingsVersion\":1923836224,\"enabledLogCategories\":[\"hlwigdivbkbxg\",\"mf\",\"juwasqvdaeyyguxa\",\"jsqzhzbezk\"]}},\"id\":\"imsidxasicddyvvj\",\"name\":\"kgfmocwahpq\",\"type\":\"atjeaahh\"},{\"properties\":{\"provisioningState\":\"hnakzyb\",\"provisioningIssues\":[{\"name\":\"dj\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"kyxvxevblbjedn\",\"perimeterGuid\":\"lageuaulxun\",\"location\":\"jbnkpp\"},\"resourceAssociation\":{\"name\":\"enlsvxeizzgwkln\",\"accessMode\":\"learning\"},\"profile\":{\"name\":\"eycxcktpiymertee\",\"accessRulesVersion\":295694801,\"accessRules\":[{},{},{}],\"diagnosticSettingsVersion\":1609142876,\"enabledLogCategories\":[\"kzddrtkgdojbmxva\",\"refdee\",\"vecuijpx\",\"xs\"]}},\"id\":\"wprtu\",\"name\":\"wsawddjibabxvi\",\"type\":\"itvtzeexavo\"}],\"nextLink\":\"fglecdmdqbwp\"}") .toObject(NetworkSecurityPerimeterConfigurationListResult.class); } 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 index 367b6de766ccb..5df6a52e672e4 100644 --- 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 @@ -14,7 +14,7 @@ public final class NetworkSecurityPerimeterConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"g\",\"provisioningIssues\":[{\"name\":\"fqntcyp\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"mwks\",\"suggestedResourceIds\":[\"cizjxvydfceacvl\",\"vygdyft\",\"mrtwna\"],\"suggestedAccessRules\":[{\"name\":\"biwkojgcyzt\",\"properties\":{}}]}},{\"name\":\"z\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"chqnrnrpxehuwry\",\"suggestedResourceIds\":[\"aifmvikl\",\"ydv\"],\"suggestedAccessRules\":[{\"name\":\"jdz\",\"properties\":{}},{\"name\":\"vdsrhnjiv\",\"properties\":{}},{\"name\":\"tnovqfzgemjdftul\",\"properties\":{}}]}},{\"name\":\"duceamtmc\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"cwwqiokn\",\"suggestedResourceIds\":[\"mojmsvpkjprvkw\",\"fz\",\"ljyxgtczhe\"],\"suggestedAccessRules\":[{\"name\":\"dshmkxmaehvbbx\",\"properties\":{}},{\"name\":\"pltfnhtba\",\"properties\":{}},{\"name\":\"xywr\",\"properties\":{}},{\"name\":\"yklyhpluodpvruud\",\"properties\":{}}]}}],\"networkSecurityPerimeter\":{\"id\":\"bth\",\"perimeterGuid\":\"tgk\",\"location\":\"tvdxeclzedqb\"},\"resourceAssociation\":{\"name\":\"zlhp\",\"accessMode\":\"audit\"},\"profile\":{\"name\":\"dlwwqfbumlkxt\",\"accessRulesVersion\":2123873865,\"accessRules\":[{\"name\":\"lmbtxhwgfwsrt\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"brhu\",\"skh\",\"dyg\",\"ookk\"]}},{\"name\":\"qjbvleorfmlu\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"avyvnqqyba\"]}},{\"name\":\"euayjkqabqgzsles\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"n\",\"tiewdj\",\"vbquwr\"]}},{\"name\":\"hwagohbuffkmrqe\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"tdrjfutacoebj\"]}}],\"diagnosticSettingsVersion\":1565918365,\"enabledLogCategories\":[\"jznmwcpmguaa\",\"raufactkahzova\",\"j\"]}}") + "{\"provisioningState\":\"gkynscliqh\",\"provisioningIssues\":[{\"name\":\"nk\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"tppn\",\"suggestedResourceIds\":[\"zxhi\"],\"suggestedAccessRules\":[{\"name\":\"b\",\"properties\":{}},{\"name\":\"qagt\",\"properties\":{}}]}}],\"networkSecurityPerimeter\":{\"id\":\"lfkqojpy\",\"perimeterGuid\":\"gtrd\",\"location\":\"ifmzzsd\"},\"resourceAssociation\":{\"name\":\"rnysux\",\"accessMode\":\"audit\"},\"profile\":{\"name\":\"wgck\",\"accessRulesVersion\":2089880576,\"accessRules\":[{\"name\":\"fffwafqroudaspav\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"bunzozudh\",\"xg\"]}}],\"diagnosticSettingsVersion\":12251409,\"enabledLogCategories\":[\"cdyuibhmfdnbzyd\",\"f\",\"fcjnaeoisrvhmgor\",\"fukiscvwmzhw\"]}}") .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 index 89be74e2c4d87..6c006137d0c7b 100644 --- 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 @@ -11,17 +11,16 @@ public final class NetworkSecurityPerimeterConfigurationReconcileResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkSecurityPerimeterConfigurationReconcileResultInner model - = BinaryData.fromString("{\"location\":\"dnhfuk\"}") - .toObject(NetworkSecurityPerimeterConfigurationReconcileResultInner.class); - Assertions.assertEquals("dnhfuk", model.location()); + NetworkSecurityPerimeterConfigurationReconcileResultInner model = BinaryData.fromString("{\"location\":\"q\"}") + .toObject(NetworkSecurityPerimeterConfigurationReconcileResultInner.class); + Assertions.assertEquals("q", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkSecurityPerimeterConfigurationReconcileResultInner model - = new NetworkSecurityPerimeterConfigurationReconcileResultInner().withLocation("dnhfuk"); + = new NetworkSecurityPerimeterConfigurationReconcileResultInner().withLocation("q"); model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationReconcileResultInner.class); - Assertions.assertEquals("dnhfuk", model.location()); + Assertions.assertEquals("q", model.location()); } } 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 efc923fdbabf4..48e2df3bb7542 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 @@ -20,7 +20,7 @@ public final class NetworkSecurityPerimeterConfigurationsGetByPrivateLinkScopeWi @Test public void testGetByPrivateLinkScopeWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"zolxrzvhqjwtr\",\"provisioningIssues\":[{\"name\":\"gzpcrrkolaw\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"okcdxfzzzwyjaf\",\"suggestedResourceIds\":[\"hguynuchlgmltxdw\",\"mozusgzvlnsnnjz\"],\"suggestedAccessRules\":[{},{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"lpymwamxqzragpg\",\"perimeterGuid\":\"htvdula\",\"location\":\"lejchcsr\"},\"resourceAssociation\":{\"name\":\"nmzlanru\",\"accessMode\":\"learning\"},\"profile\":{\"name\":\"phcnzqtpj\",\"accessRulesVersion\":1988862980,\"accessRules\":[{\"name\":\"thlaiwdcxs\",\"properties\":{}},{\"name\":\"zhzdtxetlgydlhqv\",\"properties\":{}},{\"name\":\"pxy\",\"properties\":{}},{\"name\":\"iqge\",\"properties\":{}}],\"diagnosticSettingsVersion\":755954714,\"enabledLogCategories\":[\"ekglklb\",\"ulidwc\",\"vmzegj\"]}},\"id\":\"nfhjirwgdnqzbr\",\"name\":\"kspzhzmtksjcit\",\"type\":\"igsxcdgljplk\"}"; + = "{\"properties\":{\"provisioningState\":\"pweryekzk\",\"provisioningIssues\":[{\"name\":\"ottaw\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"hnhjtfvpndpmi\",\"suggestedResourceIds\":[\"nwynudq\"],\"suggestedAccessRules\":[{},{}]}},{\"name\":\"auzpjlx\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Warning\",\"description\":\"hzlraymezxlsk\",\"suggestedResourceIds\":[\"xrfdsajre\",\"nw\"],\"suggestedAccessRules\":[{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"uwg\",\"perimeterGuid\":\"vuafpwzyifr\",\"location\":\"wltxeqipxgzdyims\"},\"resourceAssociation\":{\"name\":\"orpravkjoges\",\"accessMode\":\"learning\"},\"profile\":{\"name\":\"mjkwynq\",\"accessRulesVersion\":1693738620,\"accessRules\":[{\"name\":\"ykvwjtqpkevmyltj\",\"properties\":{}}],\"diagnosticSettingsVersion\":59854716,\"enabledLogCategories\":[\"l\",\"r\"]}},\"id\":\"clf\",\"name\":\"xa\",\"type\":\"n\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,7 +30,8 @@ public void testGetByPrivateLinkScopeWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() - .getByPrivateLinkScopeWithResponse("ovvtzejetjkln", "ikyju", "k", com.azure.core.util.Context.NONE) + .getByPrivateLinkScopeWithResponse("rwzawnvs", "cfhzagxnvhycv", "imwrzregzgyufu", + 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 a906c17bacddf..c96cfc37b5711 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 @@ -21,7 +21,7 @@ public final class NetworkSecurityPerimeterConfigurationsListByPrivateLinkScopeM @Test public void testListByPrivateLinkScope() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"gycxnmskwhqjjys\",\"provisioningIssues\":[{\"name\":\"pshhkvpedwqslsr\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"skondcbrwimu\",\"suggestedResourceIds\":[\"josovyrrl\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"inuqtljq\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"hcecybmrqbr\",\"suggestedResourceIds\":[\"mpxdlvy\",\"frexcrseqw\",\"ksghudgzhxogjgg\",\"voujkxibdafhrk\"],\"suggestedAccessRules\":[{},{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"kxfbvfbhdyirhp\",\"perimeterGuid\":\"gddeimaw\",\"location\":\"vgkk\"},\"resourceAssociation\":{\"name\":\"ikjcjcazt\",\"accessMode\":\"audit\"},\"profile\":{\"name\":\"qowxwcom\",\"accessRulesVersion\":1863569932,\"accessRules\":[{\"name\":\"vc\",\"properties\":{}}],\"diagnosticSettingsVersion\":726020344,\"enabledLogCategories\":[\"cvejyfdvlvhbwrn\"]}},\"id\":\"xt\",\"name\":\"ddpqt\",\"type\":\"ehnmnaoyankco\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"aifyzyzeyuubeids\",\"provisioningIssues\":[{\"name\":\"toi\",\"properties\":{\"issueType\":\"Other\",\"severity\":\"Warning\",\"description\":\"ltgvdihoynkrx\",\"suggestedResourceIds\":[\"wkd\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"ucpcunnuzdqumoen\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"hqhsknd\",\"suggestedResourceIds\":[\"qkaadlknw\",\"oanniyopetxi\",\"cnrly\"],\"suggestedAccessRules\":[{}]}}],\"networkSecurityPerimeter\":{\"id\":\"ephblkwqpatvbqs\",\"perimeterGuid\":\"cjbctviv\",\"location\":\"qymtuowogtgits\"},\"resourceAssociation\":{\"name\":\"vbrzcdb\",\"accessMode\":\"enforced\"},\"profile\":{\"name\":\"ds\",\"accessRulesVersion\":1628332910,\"accessRules\":[{\"name\":\"tkdbmwnrdjyib\",\"properties\":{}},{\"name\":\"aomhjrmkuhmaxl\",\"properties\":{}},{\"name\":\"f\",\"properties\":{}}],\"diagnosticSettingsVersion\":1545427056,\"enabledLogCategories\":[\"bc\",\"nc\",\"exxqcwg\",\"xf\"]}},\"id\":\"vaknokzwjj\",\"name\":\"r\",\"type\":\"tixldzyyfytpqs\"}]}"; 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("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.networkSecurityPerimeterConfigurations() - .listByPrivateLinkScope("ua", "htomflrytswfp", com.azure.core.util.Context.NONE); + .listByPrivateLinkScope("oytzpose", "xigpxvkqmaupxvpi", 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 7faba7cea90ee..e61be538483c6 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 @@ -20,7 +20,7 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileForPrivateLinkScopeMockTests { @Test public void testReconcileForPrivateLinkScope() throws Exception { - String responseStr = "{\"location\":\"guxhem\"}"; + String responseStr = "{\"location\":\"vwzdbpqvyb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testReconcileForPrivateLinkScope() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); NetworkSecurityPerimeterConfigurationReconcileResult response = manager.networkSecurityPerimeterConfigurations() - .reconcileForPrivateLinkScope("qswankltytmhdr", "znnhd", "lktgjc", com.azure.core.util.Context.NONE); + .reconcileForPrivateLinkScope("x", "mmpuj", "vyqlkjuvsmbmslzo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("guxhem", response.location()); + Assertions.assertEquals("vwzdbpqvyb", 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 index 4f37719ef76c0..cf2ae2ef566db 100644 --- 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 @@ -11,7 +11,7 @@ public final class NetworkSecurityPerimeterProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterProfile model = BinaryData.fromString( - "{\"name\":\"pi\",\"accessRulesVersion\":836392203,\"accessRules\":[{\"name\":\"xkcgxxlxsffgcvi\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"vwlyoup\"]}},{\"name\":\"fbkjubdyhgkfmi\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"fttsttk\",\"lahb\",\"actxtgzukxitm\",\"qtgqqqxhrnxr\"]}},{\"name\":\"pjui\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"dzf\",\"azivjlfrqttbajl\",\"atnwxyiopi\",\"kqqfk\"]}}],\"diagnosticSettingsVersion\":113648851,\"enabledLogCategories\":[\"kdmligovi\",\"rxkpmloazuruoc\"]}") + "{\"name\":\"kozzwculkb\",\"accessRulesVersion\":1523794500,\"accessRules\":[{\"name\":\"njwltlwtjjgu\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"nvkcdmxzrpoa\"]}},{\"name\":\"lnwiaaomylwe\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"ethwwnpjhlfz\",\"wpchwahf\"]}},{\"name\":\"usnfepgfewet\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"cxy\",\"xhdjhl\",\"mmbcxfhbcp\",\"rxvxcjzh\"]}}],\"diagnosticSettingsVersion\":398428257,\"enabledLogCategories\":[\"pxtgqscjav\",\"t\"]}") .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 index a8330ed3803f2..91f0babec5520 100644 --- 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 @@ -11,7 +11,7 @@ public final class NetworkSecurityPerimeterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeter model - = BinaryData.fromString("{\"id\":\"nszqujiz\",\"perimeterGuid\":\"oqytibyowbblgy\",\"location\":\"utp\"}") + = BinaryData.fromString("{\"id\":\"ft\",\"perimeterGuid\":\"gfcwqmpimaqxzhem\",\"location\":\"h\"}") .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 index f3ba335f05dcb..973d629091a33 100644 --- 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 @@ -11,7 +11,7 @@ public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"origin\":\"osggbhc\",\"name\":\"fwdsj\",\"display\":{\"operation\":\"ljuti\",\"resource\":\"wacf\",\"description\":\"dkzzewkfvhqcrail\",\"provider\":\"n\"},\"isDataAction\":true}]}") + "{\"value\":[{\"origin\":\"youlp\",\"name\":\"v\",\"display\":{\"operation\":\"l\",\"resource\":\"imjwosyt\",\"description\":\"tcs\",\"provider\":\"cktqumiekkezzi\"},\"isDataAction\":false}]}") .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 index b8506fc61ed1f..fd2bfe3233b1e 100644 --- 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 @@ -11,7 +11,7 @@ public final class OperationValueDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationValueDisplay model = BinaryData.fromString( - "{\"operation\":\"wvnhdldwmgx\",\"resource\":\"rslpmutwuoeg\",\"description\":\"khjwn\",\"provider\":\"qsluicp\"}") + "{\"operation\":\"xqugjhkycubedd\",\"resource\":\"sofwqmzqalkrmnji\",\"description\":\"xacqqudfnbyx\",\"provider\":\"aabjyvayffimrz\"}") .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 index 79ed10b068db8..72ab958158e17 100644 --- 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 @@ -12,7 +12,7 @@ public final class OperationValueInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationValueInner model = BinaryData.fromString( - "{\"origin\":\"flrwd\",\"name\":\"dlxyjrxs\",\"display\":{\"operation\":\"fcnihgwq\",\"resource\":\"nedgfbc\",\"description\":\"cvqvpkeqdcv\",\"provider\":\"hvoodsotbobzd\"},\"isDataAction\":false}") + "{\"origin\":\"fjhdg\",\"name\":\"gebdunygaeq\",\"display\":{\"operation\":\"qfatpxllrxcyjm\",\"resource\":\"dsuvarmywdmjsjqb\",\"description\":\"hyxxrwlycoduhpk\",\"provider\":\"gymare\"},\"isDataAction\":false}") .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 25366051736eb..0ba0d0c90929e 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 @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"origin\":\"ptfujgicgaaoept\",\"name\":\"qutdewemxs\",\"display\":{\"operation\":\"uun\",\"resource\":\"jgehkf\",\"description\":\"m\",\"provider\":\"ixokffqyin\"},\"isDataAction\":true}]}"; + = "{\"value\":[{\"origin\":\"oclu\",\"name\":\"pqmem\",\"display\":{\"operation\":\"kmmykyujxsglh\",\"resource\":\"rryejylmbkzudnig\",\"description\":\"ihotjewlpxuzzjg\",\"provider\":\"efqyhqotoihiqaky\"},\"isDataAction\":false}]}"; 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 index 01b17161d91c5..ed33f51cf8f23 100644 --- 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 @@ -15,23 +15,26 @@ public final class PrivateEndpointConnectionDataModelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionDataModel model = BinaryData.fromString( - "{\"id\":\"ximerqfobwyznk\",\"name\":\"kutwpf\",\"type\":\"a\",\"properties\":{\"privateEndpoint\":{\"id\":\"skdsnfdsdoakg\"},\"privateLinkServiceConnectionState\":{\"status\":\"lmkk\",\"description\":\"evdlh\",\"actionsRequired\":\"pusdstt\"},\"provisioningState\":\"ogvbbejdcngq\",\"groupIds\":[\"akufgmjz\",\"wr\"]}}") + "{\"id\":\"gufhyaomtbg\",\"name\":\"avgrvkffovjz\",\"type\":\"jbibg\",\"properties\":{\"privateEndpoint\":{\"id\":\"umvfclu\"},\"privateLinkServiceConnectionState\":{\"status\":\"vwxnbkfe\",\"description\":\"zxscyhwzdgirujb\",\"actionsRequired\":\"omvzzbtd\"},\"provisioningState\":\"vp\",\"groupIds\":[\"ujviylwdshfs\",\"n\",\"bgye\",\"rymsgaojfmw\"]}}") .toObject(PrivateEndpointConnectionDataModel.class); - Assertions.assertEquals("skdsnfdsdoakg", model.properties().privateEndpoint().id()); - Assertions.assertEquals("lmkk", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("evdlh", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("umvfclu", model.properties().privateEndpoint().id()); + Assertions.assertEquals("vwxnbkfe", model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("zxscyhwzdgirujb", + model.properties().privateLinkServiceConnectionState().description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointConnectionDataModel model = new PrivateEndpointConnectionDataModel().withProperties(new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpointProperty().withId("skdsnfdsdoakg")) + .withPrivateEndpoint(new PrivateEndpointProperty().withId("umvfclu")) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty().withStatus("lmkk").withDescription("evdlh"))); + new PrivateLinkServiceConnectionStateProperty().withStatus("vwxnbkfe") + .withDescription("zxscyhwzdgirujb"))); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionDataModel.class); - Assertions.assertEquals("skdsnfdsdoakg", model.properties().privateEndpoint().id()); - Assertions.assertEquals("lmkk", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("evdlh", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("umvfclu", model.properties().privateEndpoint().id()); + Assertions.assertEquals("vwxnbkfe", model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("zxscyhwzdgirujb", + 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 index bde44b9cf5410..373bdd235c2e2 100644 --- 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 @@ -15,23 +15,24 @@ public final class PrivateEndpointConnectionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"tfih\"},\"privateLinkServiceConnectionState\":{\"status\":\"botzingamvppho\",\"description\":\"zqzudph\",\"actionsRequired\":\"mvdk\"},\"provisioningState\":\"ynwcvtbv\",\"groupIds\":[\"hmtnvy\",\"iatkzwpcnp\",\"zcjaesgvvsccy\"]},\"id\":\"g\",\"name\":\"qfhwyg\",\"type\":\"lvdnkfx\"}") + "{\"properties\":{\"privateEndpoint\":{\"id\":\"zsoldwey\"},\"privateLinkServiceConnectionState\":{\"status\":\"dunvmnnrwrbiorkt\",\"description\":\"lywjhh\",\"actionsRequired\":\"nhxmsi\"},\"provisioningState\":\"omi\",\"groupIds\":[\"ggdufiqndieu\",\"ao\"]},\"id\":\"chvcyyysfgdo\",\"name\":\"cubiipuipw\",\"type\":\"qonmacj\"}") .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("tfih", model.properties().privateEndpoint().id()); - Assertions.assertEquals("botzingamvppho", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("zqzudph", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("zsoldwey", model.properties().privateEndpoint().id()); + Assertions.assertEquals("dunvmnnrwrbiorkt", model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("lywjhh", 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("tfih")) + PrivateEndpointConnectionInner model + = new PrivateEndpointConnectionInner().withProperties(new PrivateEndpointConnectionProperties() + .withPrivateEndpoint(new PrivateEndpointProperty().withId("zsoldwey")) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty().withStatus("botzingamvppho") - .withDescription("zqzudph"))); + new PrivateLinkServiceConnectionStateProperty().withStatus("dunvmnnrwrbiorkt") + .withDescription("lywjhh"))); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("tfih", model.properties().privateEndpoint().id()); - Assertions.assertEquals("botzingamvppho", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("zqzudph", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("zsoldwey", model.properties().privateEndpoint().id()); + Assertions.assertEquals("dunvmnnrwrbiorkt", model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("lywjhh", 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 index 47f6813fbcac6..2f7c091f86bd3 100644 --- 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 @@ -11,7 +11,7 @@ public final class PrivateEndpointConnectionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"zrmuhapfcqdps\"},\"privateLinkServiceConnectionState\":{\"status\":\"qvpsvuoymg\",\"description\":\"celve\",\"actionsRequired\":\"ypql\"},\"provisioningState\":\"eokerqwkyhkobopg\",\"groupIds\":[\"k\"]},\"id\":\"epbqpcrfkbw\",\"name\":\"csnjvcdwxlpqekft\",\"type\":\"khtj\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"gwfqatmt\"},\"privateLinkServiceConnectionState\":{\"status\":\"tmdvypgikdgs\",\"description\":\"ywkbirryuzhlhkjo\",\"actionsRequired\":\"vqqaatjinrvgo\"},\"provisioningState\":\"mfiibfggj\",\"groupIds\":[\"lvrwxkvtkk\",\"llqwjygvjayvblmh\"]},\"id\":\"zuhbxvvyhgsopb\",\"name\":\"rqufegxuvwz\",\"type\":\"bnhlmc\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ngitvgbmhrixkwm\"},\"privateLinkServiceConnectionState\":{\"status\":\"jejveg\",\"description\":\"hbpnaixexccbd\",\"actionsRequired\":\"ax\"},\"provisioningState\":\"exdrrvqahqkg\",\"groupIds\":[\"wijnh\",\"jsvfycxzbfvoowv\"]},\"id\":\"mtg\",\"name\":\"qp\",\"type\":\"y\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"on\"},\"privateLinkServiceConnectionState\":{\"status\":\"yhgfipnsx\",\"description\":\"mcwaekrrjr\",\"actionsRequired\":\"fxtsgum\"},\"provisioningState\":\"glikkxwslolb\",\"groupIds\":[\"uzlm\",\"felfktg\"]},\"id\":\"crpw\",\"name\":\"xeznoi\",\"type\":\"brnjwmw\"}],\"nextLink\":\"nbsazejjoqkag\"}") + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"hqvcimpevfgmblr\"},\"privateLinkServiceConnectionState\":{\"status\":\"lbywdxsm\",\"description\":\"ccwr\",\"actionsRequired\":\"scjfnyns\"},\"provisioningState\":\"ujiz\",\"groupIds\":[\"qytibyowbblgyavu\",\"pthjoxo\",\"smsks\",\"pi\"]},\"id\":\"qolj\",\"name\":\"kcgxxlxsffgcvi\",\"type\":\"qzdwlvwlyoup\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"k\"},\"privateLinkServiceConnectionState\":{\"status\":\"bdyhgkfminsgowz\",\"description\":\"ttsttktlahbqact\",\"actionsRequired\":\"gzukxitmm\"},\"provisioningState\":\"gqqqxh\",\"groupIds\":[\"rxcpjuisavo\"]},\"id\":\"dzf\",\"name\":\"azivjlfrqttbajl\",\"type\":\"atnwxyiopi\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"fku\"},\"privateLinkServiceConnectionState\":{\"status\":\"cxkdmligovi\",\"description\":\"rxkpmloazuruoc\",\"actionsRequired\":\"oorb\"},\"provisioningState\":\"oybfhjxakvvj\",\"groupIds\":[\"ordilmywwtkgkxny\",\"dabg\",\"vudtjuewbcihx\",\"uwhcjyxccybv\"]},\"id\":\"yakk\",\"name\":\"dzpxgwjpl\",\"type\":\"agst\"}],\"nextLink\":\"ohpfkyrkdbdgiog\"}") .toObject(PrivateEndpointConnectionListResult.class); } 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 index 5d785dd0cd0c8..fec982d91cdf7 100644 --- 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 @@ -14,22 +14,23 @@ public final class PrivateEndpointConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"privateEndpoint\":{\"id\":\"twaenuuzko\"},\"privateLinkServiceConnectionState\":{\"status\":\"minrfdw\",\"description\":\"yuhhziu\",\"actionsRequired\":\"fozbhdmsmlmzqhof\"},\"provisioningState\":\"maequiahxicslfa\",\"groupIds\":[\"piyylhalnswhccsp\"]}") + "{\"privateEndpoint\":{\"id\":\"tmr\"},\"privateLinkServiceConnectionState\":{\"status\":\"irctymoxoftpipiw\",\"description\":\"czuhxacpqjlihh\",\"actionsRequired\":\"spskasdvlmfwdgz\"},\"provisioningState\":\"lucvpam\",\"groupIds\":[\"euzvx\",\"risjnhnytxifqjz\",\"xmrhu\"]}") .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("twaenuuzko", model.privateEndpoint().id()); - Assertions.assertEquals("minrfdw", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("yuhhziu", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("tmr", model.privateEndpoint().id()); + Assertions.assertEquals("irctymoxoftpipiw", model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("czuhxacpqjlihh", model.privateLinkServiceConnectionState().description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpointProperty().withId("twaenuuzko")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty().withStatus("minrfdw").withDescription("yuhhziu")); + PrivateEndpointConnectionProperties model + = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpointProperty().withId("tmr")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionStateProperty().withStatus("irctymoxoftpipiw") + .withDescription("czuhxacpqjlihh")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("twaenuuzko", model.privateEndpoint().id()); - Assertions.assertEquals("minrfdw", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("yuhhziu", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("tmr", model.privateEndpoint().id()); + Assertions.assertEquals("irctymoxoftpipiw", model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("czuhxacpqjlihh", 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 e1bc9c05c2852..c775a5817963a 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 @@ -24,7 +24,7 @@ public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"lgfggcvk\"},\"privateLinkServiceConnectionState\":{\"status\":\"lizrzbjpsfxsfuz\",\"description\":\"lvt\",\"actionsRequired\":\"agb\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"vjfn\",\"jmvl\",\"yzgib\"]},\"id\":\"ujr\",\"name\":\"lfojuidjp\",\"type\":\"uyjucejikzo\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"nrqjbtxjea\"},\"privateLinkServiceConnectionState\":{\"status\":\"aqbzgyhfwwvuatbw\",\"description\":\"qamteuliys\",\"actionsRequired\":\"kcvmwfauxxepmy\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"qpkzfbojxjmcsmy\",\"wixvcpwnkwywzw\"]},\"id\":\"alickduoi\",\"name\":\"tamtyv\",\"type\":\"kn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -34,17 +34,17 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .define("fihotj") - .withExistingPrivateLinkScope("mykyujxsglhs", "rryejylmbkzudnig") + .define("ttmvmmagoaqylkjz") + .withExistingPrivateLinkScope("xdndsbdweaderzm", "ntopa") .withProperties(new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpointProperty().withId("xuzzjgnrefq")) + .withPrivateEndpoint(new PrivateEndpointProperty().withId("azjcgmxitpfin")) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty().withStatus("qotoihiqakydiwfb") - .withDescription("kwpzdqtvh"))) + new PrivateLinkServiceConnectionStateProperty().withStatus("pdltkrlg") + .withDescription("mtbdrvcqgu"))) .create(); - Assertions.assertEquals("lgfggcvk", response.properties().privateEndpoint().id()); - Assertions.assertEquals("lizrzbjpsfxsfuz", response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lvt", response.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("nrqjbtxjea", response.properties().privateEndpoint().id()); + Assertions.assertEquals("aqbzgyhfwwvuatbw", response.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("qamteuliys", 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 6d8ff172b39b3..9a81011eb91e3 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 @@ -28,7 +28,7 @@ public void testDelete() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.privateEndpointConnections() - .delete("ycjimryvwgcwwpbm", "gwe", "ydsx", com.azure.core.util.Context.NONE); + .delete("ofqcvovjufycsjm", "bemyeji", "iuxegth", 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 51201e3b1c524..6123831d29c79 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 @@ -21,7 +21,7 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"ppdbwnupgahxkum\"},\"privateLinkServiceConnectionState\":{\"status\":\"jcaacfdmmcpugm\",\"description\":\"hqepvufhbzehewh\",\"actionsRequired\":\"hnl\"},\"provisioningState\":\"nbldxeaclgschori\",\"groupIds\":[\"srrm\",\"ucsofldpuviyf\",\"aabeolhbhlvbmxuq\",\"bsxtkcudfbsfarfs\"]},\"id\":\"wlkjxn\",\"name\":\"pvwgfstmhqykizmd\",\"type\":\"saoafcluqvox\"}"; + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"szngafpgyl\"},\"privateLinkServiceConnectionState\":{\"status\":\"ecjujcng\",\"description\":\"adyedmzrgjfok\",\"actionsRequired\":\"bnoit\"},\"provisioningState\":\"pz\",\"groupIds\":[\"dgxvco\",\"raswugyxpqit\",\"eialwvskb\",\"hzacaqtyltco\"]},\"id\":\"ujpdsxzak\",\"name\":\"ejkm\",\"type\":\"bizt\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,12 +31,12 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("ukphaimmoiroq", "oshbragapyy", "mfsvbpav", com.azure.core.util.Context.NONE) + .getWithResponse("khyxvrqtvbcz", "ulmdgglm", "pjpfseykgs", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("ppdbwnupgahxkum", response.properties().privateEndpoint().id()); - Assertions.assertEquals("jcaacfdmmcpugm", response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("hqepvufhbzehewh", + Assertions.assertEquals("szngafpgyl", response.properties().privateEndpoint().id()); + Assertions.assertEquals("ecjujcng", response.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("adyedmzrgjfok", 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 dc179073366a6..16d029451335d 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 @@ -22,7 +22,7 @@ public final class PrivateEndpointConnectionsListByPrivateLinkScopeMockTests { @Test public void testListByPrivateLinkScope() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"hlowkx\"},\"privateLinkServiceConnectionState\":{\"status\":\"vbrdfjmzsyzfho\",\"description\":\"lhikcyychunsj\",\"actionsRequired\":\"jrtwsz\"},\"provisioningState\":\"vuicp\",\"groupIds\":[\"rrmhwrbfdp\",\"f\"]},\"id\":\"bhvjglr\",\"name\":\"cuyzlwhhmemhoocl\",\"type\":\"tnpqmemczjk\"}]}"; + = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"nzmnhiilia\"},\"privateLinkServiceConnectionState\":{\"status\":\"cjgckbbcccgzpra\",\"description\":\"xnyuffatsgftipwc\",\"actionsRequired\":\"yubhiqdx\"},\"provisioningState\":\"rnpnuhzafccnuh\",\"groupIds\":[\"byl\",\"ui\"]},\"id\":\"xvatvcr\",\"name\":\"dlbnbqxvhcsy\",\"type\":\"zlwxaeaovur\"}]}"; 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("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.privateEndpointConnections() - .listByPrivateLinkScope("efoh", "cbvopwndyqleallk", com.azure.core.util.Context.NONE); + .listByPrivateLinkScope("rtudawlpjfel", "erppt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("hlowkx", response.iterator().next().properties().privateEndpoint().id()); - Assertions.assertEquals("vbrdfjmzsyzfho", + Assertions.assertEquals("nzmnhiilia", response.iterator().next().properties().privateEndpoint().id()); + Assertions.assertEquals("cjgckbbcccgzpra", response.iterator().next().properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lhikcyychunsj", + Assertions.assertEquals("xnyuffatsgftipwc", 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 index 9622a1b34ab24..905f5ba091907 100644 --- 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 @@ -12,14 +12,14 @@ public final class PrivateEndpointPropertyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointProperty model - = BinaryData.fromString("{\"id\":\"aivwitqscywu\"}").toObject(PrivateEndpointProperty.class); - Assertions.assertEquals("aivwitqscywu", model.id()); + = BinaryData.fromString("{\"id\":\"wp\"}").toObject(PrivateEndpointProperty.class); + Assertions.assertEquals("wp", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointProperty model = new PrivateEndpointProperty().withId("aivwitqscywu"); + PrivateEndpointProperty model = new PrivateEndpointProperty().withId("wp"); model = BinaryData.fromObject(model).toObject(PrivateEndpointProperty.class); - Assertions.assertEquals("aivwitqscywu", model.id()); + Assertions.assertEquals("wp", 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 index e95c25faec728..6f372cf3732b8 100644 --- 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 @@ -12,7 +12,7 @@ public final class PrivateLinkResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"gpikpzimejza\",\"requiredMembers\":[\"zxiavrm\",\"zonokixrjqci\",\"gzpfrla\"],\"requiredZoneNames\":[\"rnwoiindfp\"]},\"id\":\"jylwbtlhflsj\",\"name\":\"dhszfjv\",\"type\":\"bgofeljag\"}") + "{\"properties\":{\"groupId\":\"j\",\"requiredMembers\":[\"xxpshneeku\",\"fgslqubkwdl\"],\"requiredZoneNames\":[\"d\"]},\"id\":\"tujbazpju\",\"name\":\"hminyflnorwmduv\",\"type\":\"pklvxw\"}") .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 index c972c1aa0f5f0..102fa6327bd86 100644 --- 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 @@ -11,7 +11,7 @@ public final class PrivateLinkResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"qiby\",\"requiredMembers\":[\"y\",\"wxwlmdjrkvfgb\",\"fvpdbo\",\"acizsjqlhkrr\"],\"requiredZoneNames\":[\"eibq\",\"p\"]},\"id\":\"ghvxndzwmkrefa\",\"name\":\"pjorwkqnyhg\",\"type\":\"ij\"},{\"properties\":{\"groupId\":\"vfxzsjab\",\"requiredMembers\":[\"ystawfsdjpvkvp\",\"jxbkzbzkdvn\",\"jabudurgkakmo\"],\"requiredZoneNames\":[\"jjklff\",\"mouwqlgzrfzeey\"]},\"id\":\"izikayuhq\",\"name\":\"bjbsybb\",\"type\":\"wrv\"},{\"properties\":{\"groupId\":\"gmfpgvmp\",\"requiredMembers\":[\"slthaq\"],\"requiredZoneNames\":[\"smwutwbdsrezpd\"]},\"id\":\"neuyow\",\"name\":\"kdw\",\"type\":\"t\"}],\"nextLink\":\"ib\"}") + "{\"value\":[{\"properties\":{\"groupId\":\"v\",\"requiredMembers\":[\"gemjdftuljltdu\",\"eamtmcz\",\"o\",\"ejwcwwqiok\"],\"requiredZoneNames\":[\"xmojmsvpkjp\"]},\"id\":\"kwcf\",\"name\":\"ql\",\"type\":\"yxgtczh\"},{\"properties\":{\"groupId\":\"bsdshmkxmaehvbbx\",\"requiredMembers\":[\"pltfnhtba\"],\"requiredZoneNames\":[\"xywr\"]},\"id\":\"pyklyhpluodpvru\",\"name\":\"dlgzibthostgkt\",\"type\":\"tvdxeclzedqb\"},{\"properties\":{\"groupId\":\"zlhp\",\"requiredMembers\":[\"qkdlw\",\"qfbumlkxtrqjf\",\"mlmbtxhwgfwsrta\"],\"requiredZoneNames\":[\"ezbrhubskh\",\"dyg\",\"ookk\"]},\"id\":\"qjbvleorfmlu\",\"name\":\"qtqzfavyv\",\"type\":\"qqybarye\"},{\"properties\":{\"groupId\":\"jkqa\",\"requiredMembers\":[\"zslesjcbher\",\"ntiew\",\"jcvb\",\"uwrbehwagoh\"],\"requiredZoneNames\":[\"fkmr\"]},\"id\":\"mvvhmxtdrjfuta\",\"name\":\"oe\",\"type\":\"jvewzcjznmwcp\"}],\"nextLink\":\"uaadraufactkahzo\"}") .toObject(PrivateLinkResourceListResult.class); } 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 index e9b0f194391d8..0d6c89b179db3 100644 --- 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 @@ -11,7 +11,7 @@ public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"mqhldvrii\",\"requiredMembers\":[\"nalghfkvtvsexso\",\"ueluqhhahhxvrhmz\"],\"requiredZoneNames\":[\"jgwwspughftq\",\"xhqxujxukndxdigr\",\"guufzd\"]}") + "{\"groupId\":\"gdxpg\",\"requiredMembers\":[\"hiszepnnbjcrxgib\",\"daxconfozauorsuk\"],\"requiredZoneNames\":[\"bqplh\",\"vnuuepzl\"]}") .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 e3d27e4f14b09..9a3e81192315d 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 @@ -20,7 +20,7 @@ public final class PrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"xliohrdddt\",\"requiredMembers\":[\"qbawpcbbnzqcykn\",\"p\"],\"requiredZoneNames\":[\"yuicdhzbdy\",\"wwgbdv\"]},\"id\":\"idmhmwf\",\"name\":\"plfmuvapckccrrvw\",\"type\":\"yoxoy\"}"; + = "{\"properties\":{\"groupId\":\"kpdxphlk\",\"requiredMembers\":[\"mgzvyfi\",\"dkz\",\"qnwsithuqolyah\",\"uqwqulsutrjbhxyk\"],\"requiredZoneNames\":[\"qezv\"]},\"id\":\"ugdrftbc\",\"name\":\"exreu\",\"type\":\"uowtljvfwhrea\"}"; 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("", "", AzureEnvironment.AZURE)); PrivateLinkResource response = manager.privateLinkResources() - .getWithResponse("xnazpmkml", "vevfxz", "pj", com.azure.core.util.Context.NONE) + .getWithResponse("em", "il", "udxjascowv", 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 6204d8f1b1817..b499770dae6d1 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 @@ -21,7 +21,7 @@ public final class PrivateLinkResourcesListByPrivateLinkScopeMockTests { @Test public void testListByPrivateLinkScope() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"nqcymczngnbdxxew\",\"requiredMembers\":[\"nvudbchaqdtvqecr\",\"ct\"],\"requiredZoneNames\":[\"dtddmflh\",\"ytxzvtznapxbanno\",\"voxczytpr\",\"nwvroevytlyokrr\"]},\"id\":\"uuxvnsasbcry\",\"name\":\"o\",\"type\":\"izrxklob\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"izvoaiknaqlnuwi\",\"requiredMembers\":[\"xly\"],\"requiredZoneNames\":[\"hvxzcwxhmp\",\"jtlkexaonwivkcqh\"]},\"id\":\"hxknlccrmmkyupi\",\"name\":\"ubyqj\",\"type\":\"kakfqfr\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -30,8 +30,8 @@ public void testListByPrivateLinkScope() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = manager.privateLinkResources() - .listByPrivateLinkScope("yfedevjbo", "lcqxypokk", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.privateLinkResources().listByPrivateLinkScope("fexl", "xn", 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 index 9b939ac2fda41..02aa9a9037692 100644 --- 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 @@ -15,18 +15,18 @@ public final class PrivateLinkScopeValidationDetailsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkScopeValidationDetailsInner model = BinaryData.fromString( - "{\"id\":\"sxtta\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"connectionDetails\":[{\"id\":\"aa\",\"privateIpAddress\":\"xdtnkdmkqjjlw\",\"linkIdentifier\":\"nvrk\",\"groupId\":\"ou\",\"memberName\":\"bre\"},{\"id\":\"aays\",\"privateIpAddress\":\"ixqtn\",\"linkIdentifier\":\"tezlwff\",\"groupId\":\"akpjpqqmtedlt\",\"memberName\":\"jihy\"},{\"id\":\"zphv\",\"privateIpAddress\":\"uyqncygupkvipmd\",\"linkIdentifier\":\"wx\",\"groupId\":\"pevzhfst\",\"memberName\":\"xhojuj\"},{\"id\":\"pelmcuvhixbjxyf\",\"privateIpAddress\":\"yl\",\"linkIdentifier\":\"ool\",\"groupId\":\"tpkiwkkbnujry\",\"memberName\":\"tylbfpncurdoiw\"}]}") + "{\"id\":\"kmnwqjnobaiyhddv\",\"publicNetworkAccess\":\"Enabled\",\"connectionDetails\":[{\"id\":\"n\",\"privateIpAddress\":\"tfpmvmemfnczdw\",\"linkIdentifier\":\"b\",\"groupId\":\"xlllchp\",\"memberName\":\"bzevwrd\"},{\"id\":\"fukuvsjcswsmystu\",\"privateIpAddress\":\"qypfcv\",\"linkIdentifier\":\"rchpqbmfpjbabwid\",\"groupId\":\"xsspuunnoxyhk\",\"memberName\":\"qddrihpfhoqcaae\"},{\"id\":\"aomdjvlpjxx\",\"privateIpAddress\":\"brm\",\"linkIdentifier\":\"eivsiykzkdnc\",\"groupId\":\"xonbzoggculapz\",\"memberName\":\"rpgogtqxep\"},{\"id\":\"lbfu\",\"privateIpAddress\":\"lyjt\",\"linkIdentifier\":\"of\",\"groupId\":\"hvfcibyfmow\",\"memberName\":\"rkjpvdwxfzwii\"}]}") .toObject(PrivateLinkScopeValidationDetailsInner.class); - Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, model.publicNetworkAccess()); + Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.publicNetworkAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkScopeValidationDetailsInner model = new PrivateLinkScopeValidationDetailsInner() - .withPublicNetworkAccess(PublicNetworkAccessType.SECURED_BY_PERIMETER) - .withConnectionDetails(Arrays.asList(new ConnectionDetail(), new ConnectionDetail(), new ConnectionDetail(), - new ConnectionDetail())); + PrivateLinkScopeValidationDetailsInner model + = new PrivateLinkScopeValidationDetailsInner().withPublicNetworkAccess(PublicNetworkAccessType.ENABLED) + .withConnectionDetails(Arrays.asList(new ConnectionDetail(), new ConnectionDetail(), + new ConnectionDetail(), new ConnectionDetail())); model = BinaryData.fromObject(model).toObject(PrivateLinkScopeValidationDetailsInner.class); - Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, model.publicNetworkAccess()); + Assertions.assertEquals(PublicNetworkAccessType.ENABLED, 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 438f3a48357ac..5bdf400a870d4 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 @@ -25,7 +25,7 @@ public final class PrivateLinkScopesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"r\",\"privateLinkScopeId\":\"rohkpigqfusu\",\"privateEndpointConnections\":[{\"id\":\"kwklsnoxaxmq\",\"name\":\"alhhjnhgwydyynfs\",\"type\":\"hgbvqtan\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"lpu\",\"description\":\"hp\"},\"provisioningState\":\"neizjcpe\",\"groupIds\":[\"hnmgbroux\",\"dbhfhp\",\"paz\"]}}]},\"location\":\"oywjxhpdulont\",\"tags\":{\"rhrljyoogwxhn\":\"pqwtehtue\"},\"id\":\"duugwbsre\",\"name\":\"rfqkfuar\",\"type\":\"nlvhhtklnvnafvv\"}"; + = "{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"kzykjtjk\",\"privateLinkScopeId\":\"xfwush\",\"privateEndpointConnections\":[{\"id\":\"upnqrmgjfb\",\"name\":\"uwxeoiojfizf\",\"type\":\"kjzwfbcyayk\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"sbfwxr\",\"description\":\"xmdewsrsxkrplbj\"},\"provisioningState\":\"ejwwviyoyps\",\"groupIds\":[\"rnnhjxs\",\"wjh\",\"kbiwetpozyc\"]}},{\"id\":\"iqyhgfse\",\"name\":\"lexbsf\",\"type\":\"dynojpziuwfb\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"tnhqsycl\",\"description\":\"selpkpbaf\"},\"provisioningState\":\"fhlbylccbev\",\"groupIds\":[\"yzd\",\"wrso\"]}}]},\"location\":\"ltdb\",\"tags\":{\"g\":\"rrhvhfnracwnpq\",\"ouhdawsigrb\":\"uuj\"},\"id\":\"bxsjybvitvqkj\",\"name\":\"az\",\"type\":\"umtggmuwdchozfn\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,16 +35,17 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); HybridComputePrivateLinkScope response = manager.privateLinkScopes() - .define("cjjvpilguooqja") - .withRegion("csserxht") - .withExistingResourceGroup("mlbnseq") - .withTags(mapOf("tsjgqrsx", "xhlw", "uuuybnchrsziz", "p")) - .withProperties( - new HybridComputePrivateLinkScopeProperties().withPublicNetworkAccess(PublicNetworkAccessType.DISABLED)) + .define("bugtywatmqa") + .withRegion("gxdgdhpab") + .withExistingResourceGroup("twknvgm") + .withTags(mapOf("vjsaqwotm", "xjd", "xaptefhexcgjok", "wllcolsr", "ek", "ljnhvlqj", "xeslkhhustcpoqm", + "eeksnbksdqhjvyk")) + .withProperties(new HybridComputePrivateLinkScopeProperties() + .withPublicNetworkAccess(PublicNetworkAccessType.SECURED_BY_PERIMETER)) .create(); - Assertions.assertEquals("oywjxhpdulont", response.location()); - Assertions.assertEquals("pqwtehtue", response.tags().get("rhrljyoogwxhn")); + Assertions.assertEquals("ltdb", response.location()); + Assertions.assertEquals("rrhvhfnracwnpq", response.tags().get("g")); Assertions.assertEquals(PublicNetworkAccessType.DISABLED, response.properties().publicNetworkAccess()); } 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 c4454d4a2acb6..930b1f7c9acdf 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 @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.privateLinkScopes().delete("vxwlmzqwmvtxnj", "xmcuqud", com.azure.core.util.Context.NONE); + manager.privateLinkScopes().delete("randoypmb", "t", 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 ef21e146327e2..11ce9979f2a95 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 @@ -22,7 +22,7 @@ public final class PrivateLinkScopesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"n\",\"privateLinkScopeId\":\"oxgjiuqhibt\",\"privateEndpointConnections\":[{\"id\":\"qw\",\"name\":\"d\",\"type\":\"rrxxgewpktvq\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"qpzoyhlfbcgwgcl\",\"description\":\"xoe\"},\"provisioningState\":\"injipnwjf\",\"groupIds\":[\"lafcbahh\",\"zpofoiyjwpfilk\",\"kkholvdndvia\",\"ogphuartvtiu\"]}}]},\"location\":\"efchn\",\"tags\":{\"wrweoo\":\"hmnxhkxjqi\",\"rsnewmozqvbubqma\":\"ffifhx\",\"taboidvmf\":\"hsycxhxzgaz\",\"herngb\":\"hppubowsepdfgkmt\"},\"id\":\"c\",\"name\":\"uahokq\",\"type\":\"obkauxofsh\"}"; + = "{\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"bmjk\",\"privateLinkScopeId\":\"bjgsjjxxahmrn\",\"privateEndpointConnections\":[{\"id\":\"qegxyivpin\",\"name\":\"hwbjijkgqxnhmbk\",\"type\":\"njaujvaan\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"ycwkdtaawx\",\"description\":\"fe\"},\"provisioningState\":\"umrrqmbzm\",\"groupIds\":[\"atbnxwbj\",\"idbirkfpkso\",\"dgo\"]}},{\"id\":\"wijymr\",\"name\":\"guzozkyew\",\"type\":\"nzhhhqos\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"kutycyarnroohgua\",\"description\":\"zoghktdpyczhc\"},\"provisioningState\":\"ocnhzqrottjzcfyj\",\"groupIds\":[\"wrlohapqinfszpyg\",\"qdhmrjzralcxpjby\",\"psjoqcjenk\"]}},{\"id\":\"fq\",\"name\":\"sqxfxjelgcmpz\",\"type\":\"hhhqxuwyv\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"yv\",\"description\":\"vbsizusjszlbscm\"},\"provisioningState\":\"zijiufehgmv\",\"groupIds\":[\"wyvq\",\"xrerlniylylyf\"]}}]},\"location\":\"zutgqztwhghmupg\",\"tags\":{\"bklqpxz\":\"tcdxabbujftaben\",\"nlzafwxudgnh\":\"cafeddw\",\"pbeme\":\"ookrtalvnbw\",\"kyrdnqodx\":\"uclvdjj\"},\"id\":\"hhxhq\",\"name\":\"aqnvzoqgyipemchg\",\"type\":\"v\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,12 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); HybridComputePrivateLinkScope response = manager.privateLinkScopes() - .getByResourceGroupWithResponse("cvclxynpdk", "gfabuiyjibuzphdu", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("ormkfqlwxldyk", "lsygaol", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("efchn", response.location()); - Assertions.assertEquals("hmnxhkxjqi", response.tags().get("wrweoo")); - Assertions.assertEquals(PublicNetworkAccessType.DISABLED, response.properties().publicNetworkAccess()); + Assertions.assertEquals("zutgqztwhghmupg", response.location()); + Assertions.assertEquals("tcdxabbujftaben", response.tags().get("bklqpxz")); + Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, + response.properties().publicNetworkAccess()); } } 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 da08003bd5f24..2a705f1cb408d 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 @@ -22,7 +22,7 @@ public final class PrivateLinkScopesGetValidationDetailsForMachineWithResponseMo @Test public void testGetValidationDetailsForMachineWithResponse() throws Exception { String responseStr - = "{\"id\":\"wfepbnwgfmx\",\"publicNetworkAccess\":\"Enabled\",\"connectionDetails\":[{\"id\":\"bgdlfgtdysna\",\"privateIpAddress\":\"flq\",\"linkIdentifier\":\"tqhamzjrw\",\"groupId\":\"qzeqyjleziunjxdf\",\"memberName\":\"ntkwcegy\"}]}"; + = "{\"id\":\"cgduusio\",\"publicNetworkAccess\":\"SecuredByPerimeter\",\"connectionDetails\":[{\"id\":\"p\",\"privateIpAddress\":\"lujyxkyxl\",\"linkIdentifier\":\"sjgkzzltafh\",\"groupId\":\"ffovwmbjlzqsczp\",\"memberName\":\"dwnapf\"},{\"id\":\"wow\",\"privateIpAddress\":\"ptnuwjtkschgc\",\"linkIdentifier\":\"y\",\"groupId\":\"eseyqr\",\"memberName\":\"y\"},{\"id\":\"dotjvdk\",\"privateIpAddress\":\"swskuk\",\"linkIdentifier\":\"asbvw\",\"groupId\":\"pkxkdtxfk\",\"memberName\":\"lq\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,10 +32,9 @@ public void testGetValidationDetailsForMachineWithResponse() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); PrivateLinkScopeValidationDetails response = manager.privateLinkScopes() - .getValidationDetailsForMachineWithResponse("jbaqehgpdoh", "jqatucoigebxn", - com.azure.core.util.Context.NONE) + .getValidationDetailsForMachineWithResponse("jjk", "ajb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, response.publicNetworkAccess()); + Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, 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 1e09b7a423ff8..c9ef8180314d6 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 @@ -22,7 +22,7 @@ public final class PrivateLinkScopesGetValidationDetailsWithResponseMockTests { @Test public void testGetValidationDetailsWithResponse() throws Exception { String responseStr - = "{\"id\":\"l\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"rpqaf\",\"privateIpAddress\":\"ug\",\"linkIdentifier\":\"n\",\"groupId\":\"yetefyp\",\"memberName\":\"octfjgtixrjvzuyt\"},{\"id\":\"mlmuowol\",\"privateIpAddress\":\"uir\",\"linkIdentifier\":\"ionszonwp\",\"groupId\":\"ajinnixjawrtmjfj\",\"memberName\":\"ccxlzhcoxovnek\"},{\"id\":\"nlusfnrd\",\"privateIpAddress\":\"xtxrdcqtjvidt\",\"linkIdentifier\":\"epu\",\"groupId\":\"vyjtcvu\",\"memberName\":\"asiz\"},{\"id\":\"sfuughtuqfecjx\",\"privateIpAddress\":\"gtuhxuicbu\",\"linkIdentifier\":\"mr\",\"groupId\":\"njlx\",\"memberName\":\"rhwpus\"}]}"; + = "{\"id\":\"homewjjstliu\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"aiancznvodr\",\"privateIpAddress\":\"lblxydkxrxvvb\",\"linkIdentifier\":\"wkgfbqljnqkh\",\"groupId\":\"h\",\"memberName\":\"okulehurqlrqf\"},{\"id\":\"weyurkphyjd\",\"privateIpAddress\":\"av\",\"linkIdentifier\":\"qdbrxmrgc\",\"groupId\":\"apx\",\"memberName\":\"y\"}]}"; 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("", "", AzureEnvironment.AZURE)); PrivateLinkScopeValidationDetails response = manager.privateLinkScopes() - .getValidationDetailsWithResponse("phwpnulaiywzej", "whslwkoj", com.azure.core.util.Context.NONE) + .getValidationDetailsWithResponse("czuejdtxptl", "h", 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 3bdc42e125fd5..7024b67bce68a 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 @@ -23,7 +23,7 @@ public final class PrivateLinkScopesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"tuxuuyilflq\",\"privateLinkScopeId\":\"quvre\",\"privateEndpointConnections\":[{\"id\":\"jhvsujztczyt\",\"name\":\"t\",\"type\":\"auunfprnjletlx\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"ddoui\",\"description\":\"amowaziynknlqwzd\"},\"provisioningState\":\"iwhxqszdtmaajq\",\"groupIds\":[\"xylrjvmtygjbmz\",\"ospspshckf\",\"yjpmspbpssdfppyo\",\"tieyujtvczkcny\"]}},{\"id\":\"x\",\"name\":\"njdxvglnkvxl\",\"type\":\"aglqivbgkcvkh\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"qdf\",\"description\":\"voniypfp\"},\"provisioningState\":\"cpzgpxtiv\",\"groupIds\":[\"nidibgqjxg\",\"n\"]}},{\"id\":\"govfgpikqmhhaow\",\"name\":\"mzvupor\",\"type\":\"dfuyd\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"vxcnqmxqps\",\"description\":\"okmvkhlggd\"},\"provisioningState\":\"em\",\"groupIds\":[\"zszuwiwtglxx\"]}},{\"id\":\"jfpgpicrmn\",\"name\":\"rgmqgjs\",\"type\":\"pqcbfrmbodthsq\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"iibakcl\",\"description\":\"c\"},\"provisioningState\":\"rnxousxauzlwvsg\",\"groupIds\":[\"hqf\",\"izvu\"]}}]},\"location\":\"mk\",\"tags\":{\"ovmribiattg\":\"thnwpzte\"},\"id\":\"lu\",\"name\":\"fotang\",\"type\":\"fhnykzcugs\"}]}"; + = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"tywikd\",\"privateLinkScopeId\":\"lakuflgbhgauacd\",\"privateEndpointConnections\":[{\"id\":\"ufr\",\"name\":\"yjq\",\"type\":\"kfnozoeoqbvj\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"gwbmqj\",\"description\":\"hntasfaymx\"},\"provisioningState\":\"lpzealbmqkyojwyv\",\"groupIds\":[\"btsuahxs\",\"xjcmmzrrsc\",\"biwsd\"]}}]},\"location\":\"pxqwo\",\"tags\":{\"ogjo\":\"fjxcjrmmuabwibv\",\"in\":\"mcyefoyzbam\",\"boclzhzjknyuxgv\":\"ofvfkakpoldtve\",\"mrdixtreki\":\"txpnrupza\"},\"id\":\"swyskbruffg\",\"name\":\"lukkutvlxhrpqhvm\",\"type\":\"lcouqehbhbcdszir\"}]}"; 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("", "", AzureEnvironment.AZURE)); PagedIterable response - = manager.privateLinkScopes().listByResourceGroup("ugjknf", com.azure.core.util.Context.NONE); + = manager.privateLinkScopes().listByResourceGroup("v", com.azure.core.util.Context.NONE); - Assertions.assertEquals("mk", response.iterator().next().location()); - Assertions.assertEquals("thnwpzte", response.iterator().next().tags().get("ovmribiattg")); - Assertions.assertEquals(PublicNetworkAccessType.DISABLED, + Assertions.assertEquals("pxqwo", response.iterator().next().location()); + Assertions.assertEquals("fjxcjrmmuabwibv", response.iterator().next().tags().get("ogjo")); + Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, response.iterator().next().properties().publicNetworkAccess()); } } 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 b9764a2fe2c45..f9c0ee85917a9 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 @@ -23,7 +23,7 @@ public final class PrivateLinkScopesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"SecuredByPerimeter\",\"provisioningState\":\"jww\",\"privateLinkScopeId\":\"z\",\"privateEndpointConnections\":[{\"id\":\"mxqhndvnoamldse\",\"name\":\"ohdjhhflzok\",\"type\":\"ox\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"jetagltsxoatft\",\"description\":\"zpnpbswv\"},\"provisioningState\":\"loccsrmozihm\",\"groupIds\":[\"awtxxpk\"]}},{\"id\":\"cxcjxgry\",\"name\":\"mpcycilrmcaykgg\",\"type\":\"xu\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"sxwpndfcpfnznthj\",\"description\":\"wkjaos\"},\"provisioningState\":\"uzvoamktcqiosm\",\"groupIds\":[\"ahgx\"]}},{\"id\":\"lyrtltlaprlt\",\"name\":\"atbhjmznn\",\"type\":\"oqeq\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"vlagun\",\"description\":\"tgfebwln\"},\"provisioningState\":\"hyreeu\",\"groupIds\":[\"av\",\"pdqmjxlyyzglgouw\",\"lmjjyuo\"]}},{\"id\":\"tob\",\"name\":\"kjeytunl\",\"type\":\"jkwrusnkq\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"rqunjq\",\"description\":\"denxau\"},\"provisioningState\":\"pakdkifmjnnawt\",\"groupIds\":[\"pxuckpggq\",\"wey\",\"rdhlis\",\"gwflq\"]}}]},\"location\":\"pizruwnpqxpxiw\",\"tags\":{\"zjvkviirhgfgrws\":\"gjsaasiixtm\",\"tctbrxkjzwrgxffm\":\"pgratzvzbglbyvi\"},\"id\":\"hkwfbkgozxwop\",\"name\":\"bydpizqaclnapxb\",\"type\":\"yg\"}]}"; + = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"t\",\"privateLinkScopeId\":\"oyin\",\"privateEndpointConnections\":[{\"id\":\"rlcyrduc\",\"name\":\"go\",\"type\":\"y\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"cvcrrp\",\"description\":\"jttbstv\"},\"provisioningState\":\"aqnrmvvfkoxmlg\",\"groupIds\":[\"uidvrmazlpdwwex\",\"mzvlazipbh\",\"wvqsgny\"]}},{\"id\":\"uzivensrpmeyyvp\",\"name\":\"atlb\",\"type\":\"pzgsk\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"fvolmknbnxwcd\",\"description\":\"mmpvf\"},\"provisioningState\":\"wzfgbrttuiaclkie\",\"groupIds\":[\"jlfnthiq\",\"yuttdiygbpvnwswm\",\"xkyctwwgzwx\"]}},{\"id\":\"mecvogygzyvneeza\",\"name\":\"gh\",\"type\":\"oqqtl\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"bkrkjj\",\"description\":\"avfqnvhnqoewdogi\"},\"provisioningState\":\"tesypvidbztjh\",\"groupIds\":[\"b\"]}},{\"id\":\"nynkbwet\",\"name\":\"uhpsprkzyaupia\",\"type\":\"xnafbw\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"htuov\",\"description\":\"aonurjtumg\"},\"provisioningState\":\"hpv\",\"groupIds\":[\"slclblyjxltbsju\",\"c\",\"sfxigctmgx\"]}}]},\"location\":\"pbezqccydrtceu\",\"tags\":{\"eq\":\"kkyihzt\",\"ecfehuwa\":\"gqzgwldoychill\",\"uhicqllizstacsjv\":\"a\",\"wqejpmvsse\":\"rweft\"},\"id\":\"aepwamcxtcz\",\"name\":\"upeuknijduyye\",\"type\":\"pydjfboc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,9 +35,9 @@ public void testList() throws Exception { PagedIterable response = manager.privateLinkScopes().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("pizruwnpqxpxiw", response.iterator().next().location()); - Assertions.assertEquals("gjsaasiixtm", response.iterator().next().tags().get("zjvkviirhgfgrws")); - Assertions.assertEquals(PublicNetworkAccessType.SECURED_BY_PERIMETER, + Assertions.assertEquals("pbezqccydrtceu", response.iterator().next().location()); + Assertions.assertEquals("kkyihzt", response.iterator().next().tags().get("eq")); + Assertions.assertEquals(PublicNetworkAccessType.DISABLED, response.iterator().next().properties().publicNetworkAccess()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesResourceTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesResourceTests.java index 6ca2ebd09b299..777b709a972da 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesResourceTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesResourceTests.java @@ -14,20 +14,19 @@ public final class PrivateLinkScopesResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkScopesResource model = BinaryData.fromString( - "{\"location\":\"rgzdwmsweyp\",\"tags\":{\"tlstvlzywem\":\"xggicccnxqhuexmk\",\"lusiy\":\"zrncsdt\",\"cy\":\"bsfgytguslfea\",\"xgfpelolppv\":\"qukyhejhzi\"},\"id\":\"srp\",\"name\":\"vu\",\"type\":\"zraehtwd\"}") + "{\"location\":\"zpnfqntcypsxj\",\"tags\":{\"vydfceacvlhvygdy\":\"imwkslircizj\",\"mrtwna\":\"t\",\"wkojgcyztsfmzn\":\"jslb\"},\"id\":\"aeqphchqnr\",\"name\":\"rpxeh\",\"type\":\"wrykqgai\"}") .toObject(PrivateLinkScopesResource.class); - Assertions.assertEquals("rgzdwmsweyp", model.location()); - Assertions.assertEquals("xggicccnxqhuexmk", model.tags().get("tlstvlzywem")); + Assertions.assertEquals("zpnfqntcypsxj", model.location()); + Assertions.assertEquals("imwkslircizj", model.tags().get("vydfceacvlhvygdy")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkScopesResource model = new PrivateLinkScopesResource().withLocation("rgzdwmsweyp") - .withTags(mapOf("tlstvlzywem", "xggicccnxqhuexmk", "lusiy", "zrncsdt", "cy", "bsfgytguslfea", "xgfpelolppv", - "qukyhejhzi")); + PrivateLinkScopesResource model = new PrivateLinkScopesResource().withLocation("zpnfqntcypsxj") + .withTags(mapOf("vydfceacvlhvygdy", "imwkslircizj", "mrtwna", "t", "wkojgcyztsfmzn", "jslb")); model = BinaryData.fromObject(model).toObject(PrivateLinkScopesResource.class); - Assertions.assertEquals("rgzdwmsweyp", model.location()); - Assertions.assertEquals("xggicccnxqhuexmk", model.tags().get("tlstvlzywem")); + Assertions.assertEquals("zpnfqntcypsxj", model.location()); + Assertions.assertEquals("imwkslircizj", model.tags().get("vydfceacvlhvygdy")); } // Use "Map.of" if available 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 index f6abc126e67c3..30bb747a1913e 100644 --- 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 @@ -11,19 +11,19 @@ public final class PrivateLinkServiceConnectionStatePropertyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionStateProperty model - = BinaryData.fromString("{\"status\":\"gwol\",\"description\":\"h\",\"actionsRequired\":\"bwemhairs\"}") - .toObject(PrivateLinkServiceConnectionStateProperty.class); - Assertions.assertEquals("gwol", model.status()); - Assertions.assertEquals("h", model.description()); + PrivateLinkServiceConnectionStateProperty model = BinaryData + .fromString("{\"status\":\"esutrgjupauutpw\",\"description\":\"qhih\",\"actionsRequired\":\"qg\"}") + .toObject(PrivateLinkServiceConnectionStateProperty.class); + Assertions.assertEquals("esutrgjupauutpw", model.status()); + Assertions.assertEquals("qhih", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateLinkServiceConnectionStateProperty model - = new PrivateLinkServiceConnectionStateProperty().withStatus("gwol").withDescription("h"); + = new PrivateLinkServiceConnectionStateProperty().withStatus("esutrgjupauutpw").withDescription("qhih"); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionStateProperty.class); - Assertions.assertEquals("gwol", model.status()); - Assertions.assertEquals("h", model.description()); + Assertions.assertEquals("esutrgjupauutpw", model.status()); + Assertions.assertEquals("qhih", 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 new file mode 100644 index 0000000000000..b3c7e3a917547 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProcessorTests.java @@ -0,0 +1,22 @@ +// 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.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\":\"jeyp\",\"numberOfCores\":1237692135}").toObject(Processor.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + Processor model = new Processor(); + model = BinaryData.fromObject(model).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 index 1e7fc4c4a93bc..064f77a3738d4 100644 --- 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 @@ -12,18 +12,18 @@ public final class ProductFeatureUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ProductFeatureUpdate model = BinaryData.fromString("{\"name\":\"bkyvp\",\"subscriptionStatus\":\"Disable\"}") + ProductFeatureUpdate model = BinaryData.fromString("{\"name\":\"ncw\",\"subscriptionStatus\":\"Enable\"}") .toObject(ProductFeatureUpdate.class); - Assertions.assertEquals("bkyvp", model.name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); + Assertions.assertEquals("ncw", model.name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProductFeatureUpdate model = new ProductFeatureUpdate().withName("bkyvp") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE); + ProductFeatureUpdate model = new ProductFeatureUpdate().withName("ncw") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE); model = BinaryData.fromObject(model).toObject(ProductFeatureUpdate.class); - Assertions.assertEquals("bkyvp", model.name()); - Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); + Assertions.assertEquals("ncw", model.name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, 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 index d133492bf0ea4..cb1b8b6d037b7 100644 --- 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 @@ -16,11 +16,11 @@ public final class ProductProfileUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProductProfileUpdateProperties model = BinaryData.fromString( - "{\"subscriptionStatus\":\"Disable\",\"productType\":\"WindowsServer\",\"productFeatures\":[{\"name\":\"rqjbhckfrl\",\"subscriptionStatus\":\"Disable\"}]}") + "{\"subscriptionStatus\":\"Disable\",\"productType\":\"WindowsServer\",\"productFeatures\":[{\"name\":\"igvpgylg\",\"subscriptionStatus\":\"Disable\"},{\"name\":\"xmedjvcsly\",\"subscriptionStatus\":\"Disable\"}]}") .toObject(ProductProfileUpdateProperties.class); Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); - Assertions.assertEquals("rqjbhckfrl", model.productFeatures().get(0).name()); + Assertions.assertEquals("igvpgylg", model.productFeatures().get(0).name()); Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.productFeatures().get(0).subscriptionStatus()); } @@ -30,12 +30,15 @@ public void testSerialize() throws Exception { ProductProfileUpdateProperties model = new ProductProfileUpdateProperties() .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE) .withProductType(LicenseProfileProductType.WINDOWS_SERVER) - .withProductFeatures(Arrays.asList(new ProductFeatureUpdate().withName("rqjbhckfrl") - .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE))); + .withProductFeatures(Arrays.asList( + new ProductFeatureUpdate().withName("igvpgylg") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE), + new ProductFeatureUpdate().withName("xmedjvcsly") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE))); model = BinaryData.fromObject(model).toObject(ProductProfileUpdateProperties.class); Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, model.subscriptionStatus()); Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); - Assertions.assertEquals("rqjbhckfrl", model.productFeatures().get(0).name()); + Assertions.assertEquals("igvpgylg", 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 index 0e61a826195a4..035df51e5e4ce 100644 --- 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 @@ -11,7 +11,7 @@ public final class ProvisioningIssuePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProvisioningIssueProperties model = BinaryData.fromString( - "{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"nb\",\"suggestedResourceIds\":[\"xgibbda\",\"confozauors\"],\"suggestedAccessRules\":[{\"name\":\"wbqpl\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"epzl\",\"phwzsoldweyuqdu\"]}},{\"name\":\"mnnrwr\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"alywjhhgdn\",\"xmsivfomiloxggdu\",\"iqndieuzaofj\",\"hvcyyysfg\"]}}]}") + "{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"tikteusqczkvykl\",\"suggestedResourceIds\":[\"yja\",\"fmmfblcqcu\",\"bgq\"],\"suggestedAccessRules\":[{\"name\":\"a\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"wgdsl\"]}},{\"name\":\"ihhrmo\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"ypxiutcxap\",\"hyrpetogebjoxs\",\"hvnh\",\"abrqnkkzj\"]}}]}") .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 index 3c6f6a9415427..73f3c57753ace 100644 --- 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 @@ -11,7 +11,7 @@ public final class ProvisioningIssueTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProvisioningIssue model = BinaryData.fromString( - "{\"name\":\"uxxpshne\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"lqubkwdlen\",\"suggestedResourceIds\":[\"utujba\",\"pjuohminyfl\"],\"suggestedAccessRules\":[{\"name\":\"mduvw\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"mygdxpgpqch\"]}}]}}") + "{\"name\":\"efaxvxilc\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"eyqxtjjfzql\",\"suggestedResourceIds\":[\"cavodggxdbe\",\"smieknlra\",\"iaa\",\"iuagydwqfbylyrfg\"],\"suggestedAccessRules\":[{\"name\":\"cojocqwogfnzjvus\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"zuxylfsbtkadpyso\",\"nbtgkbugrjqctoj\",\"mi\",\"of\"]}},{\"name\":\"ypefojyqdhcupl\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"hihihlhzdsqtzbsr\",\"nowc\",\"hfgmvecactxm\"]}},{\"name\":\"teyowclu\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"vgqouwifzmpj\",\"yivqikfxcvhrfsp\"]}}]}}") .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 index 6325392cacab0..8c7ea85f35cf7 100644 --- 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 @@ -10,7 +10,7 @@ public final class ResourceAssociationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceAssociation model = BinaryData.fromString("{\"name\":\"joxoism\",\"accessMode\":\"audit\"}") + ResourceAssociation model = BinaryData.fromString("{\"name\":\"uj\",\"accessMode\":\"learning\"}") .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 111969de4ed71..c6868cccdd7c4 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 @@ -32,11 +32,10 @@ public void testUpgradeExtensions() throws Exception { new AzureProfile("", "", AzureEnvironment.AZURE)); manager.resourceProviders() - .upgradeExtensions("mwwinhehfqpofv", "bcblemb", - new MachineExtensionUpgrade() - .withExtensionTargets(mapOf("ivqiheb", new ExtensionTargetProperties().withTargetVersion("vqvxk"), - "izvcjfe", new ExtensionTargetProperties().withTargetVersion("swbzuwfmdurage"), "zgakgacyrcmj", - new ExtensionTargetProperties().withTargetVersion("sdjubggbqigkxkbs"))), + .upgradeExtensions("chorimkrsr", "moucsofldpuviyfc", + new MachineExtensionUpgrade().withExtensionTargets( + mapOf("xuqibsxtkcudf", new ExtensionTargetProperties().withTargetVersion("olhbhlvb"), "owlkjxnqpv", + new ExtensionTargetProperties().withTargetVersion("farfs"))), com.azure.core.util.Context.NONE); } 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 new file mode 100644 index 0000000000000..ca47a8c6f3025 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandInputParameterTests.java @@ -0,0 +1,29 @@ +// 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.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\":\"sgsahmkycgr\",\"value\":\"uwjuetaeburuvdmo\"}") + .toObject(RunCommandInputParameter.class); + Assertions.assertEquals("sgsahmkycgr", model.name()); + Assertions.assertEquals("uwjuetaeburuvdmo", model.value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RunCommandInputParameter model + = new RunCommandInputParameter().withName("sgsahmkycgr").withValue("uwjuetaeburuvdmo"); + model = BinaryData.fromObject(model).toObject(RunCommandInputParameter.class); + Assertions.assertEquals("sgsahmkycgr", model.name()); + Assertions.assertEquals("uwjuetaeburuvdmo", 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 new file mode 100644 index 0000000000000..10eb49a431998 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandManagedIdentityTests.java @@ -0,0 +1,28 @@ +// 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.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\":\"gdknnqv\",\"objectId\":\"znqntoru\"}") + .toObject(RunCommandManagedIdentity.class); + Assertions.assertEquals("gdknnqv", model.clientId()); + Assertions.assertEquals("znqntoru", model.objectId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RunCommandManagedIdentity model + = new RunCommandManagedIdentity().withClientId("gdknnqv").withObjectId("znqntoru"); + model = BinaryData.fromObject(model).toObject(RunCommandManagedIdentity.class); + Assertions.assertEquals("gdknnqv", model.clientId()); + Assertions.assertEquals("znqntoru", model.objectId()); + } +} 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 index ccb48abfa2647..86a9481b23da9 100644 --- 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 @@ -11,17 +11,17 @@ public final class ServiceStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServiceStatus model = BinaryData.fromString("{\"status\":\"hjybigehoqfbo\",\"startupType\":\"kanyktzlcuiywg\"}") + ServiceStatus model = BinaryData.fromString("{\"status\":\"evfyexfwhybcib\",\"startupType\":\"vdcsitynn\"}") .toObject(ServiceStatus.class); - Assertions.assertEquals("hjybigehoqfbo", model.status()); - Assertions.assertEquals("kanyktzlcuiywg", model.startupType()); + Assertions.assertEquals("evfyexfwhybcib", model.status()); + Assertions.assertEquals("vdcsitynn", model.startupType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceStatus model = new ServiceStatus().withStatus("hjybigehoqfbo").withStartupType("kanyktzlcuiywg"); + ServiceStatus model = new ServiceStatus().withStatus("evfyexfwhybcib").withStartupType("vdcsitynn"); model = BinaryData.fromObject(model).toObject(ServiceStatus.class); - Assertions.assertEquals("hjybigehoqfbo", model.status()); - Assertions.assertEquals("kanyktzlcuiywg", model.startupType()); + Assertions.assertEquals("evfyexfwhybcib", model.status()); + Assertions.assertEquals("vdcsitynn", 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 index 619a0fb4d7510..85f0ad826f179 100644 --- 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 @@ -13,23 +13,23 @@ public final class ServiceStatusesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceStatuses model = BinaryData.fromString( - "{\"extensionService\":{\"status\":\"gug\",\"startupType\":\"krxd\"},\"guestConfigurationService\":{\"status\":\"dt\",\"startupType\":\"zrvqdr\"}}") + "{\"extensionService\":{\"status\":\"dndnvow\",\"startupType\":\"jjugwdkcglhslaz\"},\"guestConfigurationService\":{\"status\":\"ggd\",\"startupType\":\"ixhbkuofqweykhm\"}}") .toObject(ServiceStatuses.class); - Assertions.assertEquals("gug", model.extensionService().status()); - Assertions.assertEquals("krxd", model.extensionService().startupType()); - Assertions.assertEquals("dt", model.guestConfigurationService().status()); - Assertions.assertEquals("zrvqdr", model.guestConfigurationService().startupType()); + Assertions.assertEquals("dndnvow", model.extensionService().status()); + Assertions.assertEquals("jjugwdkcglhslaz", model.extensionService().startupType()); + Assertions.assertEquals("ggd", model.guestConfigurationService().status()); + Assertions.assertEquals("ixhbkuofqweykhm", model.guestConfigurationService().startupType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceStatuses model - = new ServiceStatuses().withExtensionService(new ServiceStatus().withStatus("gug").withStartupType("krxd")) - .withGuestConfigurationService(new ServiceStatus().withStatus("dt").withStartupType("zrvqdr")); + ServiceStatuses model = new ServiceStatuses() + .withExtensionService(new ServiceStatus().withStatus("dndnvow").withStartupType("jjugwdkcglhslaz")) + .withGuestConfigurationService(new ServiceStatus().withStatus("ggd").withStartupType("ixhbkuofqweykhm")); model = BinaryData.fromObject(model).toObject(ServiceStatuses.class); - Assertions.assertEquals("gug", model.extensionService().status()); - Assertions.assertEquals("krxd", model.extensionService().startupType()); - Assertions.assertEquals("dt", model.guestConfigurationService().status()); - Assertions.assertEquals("zrvqdr", model.guestConfigurationService().startupType()); + Assertions.assertEquals("dndnvow", model.extensionService().status()); + Assertions.assertEquals("jjugwdkcglhslaz", model.extensionService().startupType()); + Assertions.assertEquals("ggd", model.guestConfigurationService().status()); + Assertions.assertEquals("ixhbkuofqweykhm", 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 new file mode 100644 index 0000000000000..91563bef20eae --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsGatewayPropertiesTests.java @@ -0,0 +1,25 @@ +// 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.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\":\"yowqkdwytisibir\"}") + .toObject(SettingsGatewayProperties.class); + Assertions.assertEquals("yowqkdwytisibir", model.gatewayResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SettingsGatewayProperties model = new SettingsGatewayProperties().withGatewayResourceId("yowqkdwytisibir"); + model = BinaryData.fromObject(model).toObject(SettingsGatewayProperties.class); + Assertions.assertEquals("yowqkdwytisibir", 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 new file mode 100644 index 0000000000000..288aa25b62901 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsInnerTests.java @@ -0,0 +1,26 @@ +// 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.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\":\"zrfze\",\"gatewayProperties\":{\"gatewayResourceId\":\"bizikayuhq\"}},\"id\":\"jbsybbqw\",\"name\":\"vtldgmfpgvmpip\",\"type\":\"slthaq\"}") + .toObject(SettingsInner.class); + Assertions.assertEquals("bizikayuhq", model.gatewayResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SettingsInner model = new SettingsInner().withGatewayResourceId("bizikayuhq"); + model = BinaryData.fromObject(model).toObject(SettingsInner.class); + Assertions.assertEquals("bizikayuhq", 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 new file mode 100644 index 0000000000000..0ef1eebbaf504 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsGetWithResponseMockTests.java @@ -0,0 +1,39 @@ +// 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.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.hybridcompute.HybridComputeManager; +import com.azure.resourcemanager.hybridcompute.models.Settings; +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 SettingsOperationsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"tenantId\":\"wzohm\",\"gatewayProperties\":{\"gatewayResourceId\":\"xbsojkli\"}},\"id\":\"mdptys\",\"name\":\"rqsgnzx\",\"type\":\"jp\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HybridComputeManager manager = HybridComputeManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Settings response = manager.settingsOperations() + .getWithResponse("bxcea", "xcptsoqfyiaseqc", "krtt", "razisg", "kiuemv", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("xbsojkli", 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 new file mode 100644 index 0000000000000..fc063683508d3 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsPatchWithResponseMockTests.java @@ -0,0 +1,41 @@ +// 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.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.hybridcompute.HybridComputeManager; +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; +import com.azure.resourcemanager.hybridcompute.models.Settings; +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 SettingsOperationsPatchWithResponseMockTests { + @Test + public void testPatchWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"tenantId\":\"ntuygdhgaqipir\",\"gatewayProperties\":{\"gatewayResourceId\":\"rqofulopmjnlexwh\"}},\"id\":\"jpib\",\"name\":\"e\",\"type\":\"hu\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HybridComputeManager manager = HybridComputeManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Settings response = manager.settingsOperations() + .patchWithResponse("zasunwqrjzfrgq", "aohcmbuocn", "r", "hmbpyryxamebly", "yvk", + new SettingsInner().withGatewayResourceId("dlfp"), com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("rqofulopmjnlexwh", 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 new file mode 100644 index 0000000000000..9dca58301fcc3 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsOperationsUpdateWithResponseMockTests.java @@ -0,0 +1,41 @@ +// 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.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.hybridcompute.HybridComputeManager; +import com.azure.resourcemanager.hybridcompute.fluent.models.SettingsInner; +import com.azure.resourcemanager.hybridcompute.models.Settings; +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 SettingsOperationsUpdateWithResponseMockTests { + @Test + public void testUpdateWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"tenantId\":\"bgatzu\",\"gatewayProperties\":{\"gatewayResourceId\":\"xngre\"}},\"id\":\"ggahtt\",\"name\":\"lswva\",\"type\":\"qfutlxjo\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + HybridComputeManager manager = HybridComputeManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + Settings response = manager.settingsOperations() + .updateWithResponse("lsvjgpliu", "iqwoyxqvapcoh", "oucqpqojx", "x", "rzdcgdzbenribcaw", + new SettingsInner().withGatewayResourceId("wflj"), com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("xngre", 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 new file mode 100644 index 0000000000000..6f2dd73d8243a --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/SettingsPropertiesTests.java @@ -0,0 +1,26 @@ +// 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.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\":\"ss\",\"gatewayProperties\":{\"gatewayResourceId\":\"twbdsrezpdrhn\"}}") + .toObject(SettingsProperties.class); + Assertions.assertEquals("twbdsrezpdrhn", model.gatewayResourceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SettingsProperties model = new SettingsProperties().withGatewayResourceId("twbdsrezpdrhn"); + model = BinaryData.fromObject(model).toObject(SettingsProperties.class); + Assertions.assertEquals("twbdsrezpdrhn", 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 new file mode 100644 index 0000000000000..1c8c6137b5bf7 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/StorageProfileTests.java @@ -0,0 +1,61 @@ +// 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.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridcompute.models.Disk; +import com.azure.resourcemanager.hybridcompute.models.StorageProfile; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class StorageProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + StorageProfile model = BinaryData.fromString( + "{\"disks\":[{\"path\":\"gqhcjrefovg\",\"diskType\":\"qsl\",\"generatedId\":\"yvxyqjp\",\"id\":\"attpngjcrcczsq\",\"name\":\"hvmdajvnysounq\",\"maxSizeInBytes\":418960561547005432,\"usedSpaceInBytes\":1672936425518901081},{\"path\":\"pfhyhl\",\"diskType\":\"pmopjmc\",\"generatedId\":\"tuo\",\"id\":\"hfuiuaodsfc\",\"name\":\"vxodpu\",\"maxSizeInBytes\":6217574440199654297,\"usedSpaceInBytes\":2005682789733735628},{\"path\":\"gf\",\"diskType\":\"xbezyiuokktwh\",\"generatedId\":\"xw\",\"id\":\"wqsmbsur\",\"name\":\"imoryocfsfksym\",\"maxSizeInBytes\":1617028943376388649,\"usedSpaceInBytes\":5124358423287325005}]}") + .toObject(StorageProfile.class); + Assertions.assertEquals("gqhcjrefovg", model.disks().get(0).path()); + Assertions.assertEquals("qsl", model.disks().get(0).diskType()); + Assertions.assertEquals("yvxyqjp", model.disks().get(0).generatedId()); + Assertions.assertEquals("attpngjcrcczsq", model.disks().get(0).id()); + Assertions.assertEquals("hvmdajvnysounq", model.disks().get(0).name()); + Assertions.assertEquals(418960561547005432L, model.disks().get(0).maxSizeInBytes()); + Assertions.assertEquals(1672936425518901081L, model.disks().get(0).usedSpaceInBytes()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + StorageProfile model = new StorageProfile().withDisks(Arrays.asList( + new Disk().withPath("gqhcjrefovg") + .withDiskType("qsl") + .withGeneratedId("yvxyqjp") + .withId("attpngjcrcczsq") + .withName("hvmdajvnysounq") + .withMaxSizeInBytes(418960561547005432L) + .withUsedSpaceInBytes(1672936425518901081L), + new Disk().withPath("pfhyhl") + .withDiskType("pmopjmc") + .withGeneratedId("tuo") + .withId("hfuiuaodsfc") + .withName("vxodpu") + .withMaxSizeInBytes(6217574440199654297L) + .withUsedSpaceInBytes(2005682789733735628L), + new Disk().withPath("gf") + .withDiskType("xbezyiuokktwh") + .withGeneratedId("xw") + .withId("wqsmbsur") + .withName("imoryocfsfksym") + .withMaxSizeInBytes(1617028943376388649L) + .withUsedSpaceInBytes(5124358423287325005L))); + model = BinaryData.fromObject(model).toObject(StorageProfile.class); + Assertions.assertEquals("gqhcjrefovg", model.disks().get(0).path()); + Assertions.assertEquals("qsl", model.disks().get(0).diskType()); + Assertions.assertEquals("yvxyqjp", model.disks().get(0).generatedId()); + Assertions.assertEquals("attpngjcrcczsq", model.disks().get(0).id()); + Assertions.assertEquals("hvmdajvnysounq", model.disks().get(0).name()); + Assertions.assertEquals(418960561547005432L, model.disks().get(0).maxSizeInBytes()); + Assertions.assertEquals(1672936425518901081L, model.disks().get(0).usedSpaceInBytes()); + } +} 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 index d49d64569d96d..e2d1340ce06c9 100644 --- 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 @@ -11,14 +11,14 @@ public final class SubnetTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Subnet model = BinaryData.fromString("{\"addressPrefix\":\"sicohoqqnwvlry\"}").toObject(Subnet.class); - Assertions.assertEquals("sicohoqqnwvlry", model.addressPrefix()); + Subnet model = BinaryData.fromString("{\"addressPrefix\":\"kv\"}").toObject(Subnet.class); + Assertions.assertEquals("kv", model.addressPrefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Subnet model = new Subnet().withAddressPrefix("sicohoqqnwvlry"); + Subnet model = new Subnet().withAddressPrefix("kv"); model = BinaryData.fromObject(model).toObject(Subnet.class); - Assertions.assertEquals("sicohoqqnwvlry", model.addressPrefix()); + Assertions.assertEquals("kv", 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 index 922b117528b7b..a49f2831e6c8e 100644 --- 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 @@ -13,18 +13,16 @@ public final class TagsResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TagsResource model = BinaryData.fromString( - "{\"tags\":{\"cdl\":\"tswiby\",\"hfwpracstwit\":\"h\",\"nmdyodnwzxl\":\"khevxccedc\",\"nhltiugcxn\":\"jc\"}}") + TagsResource model = BinaryData.fromString("{\"tags\":{\"jdz\":\"iklbydvkhb\",\"srhnjivo\":\"xcv\"}}") .toObject(TagsResource.class); - Assertions.assertEquals("tswiby", model.tags().get("cdl")); + Assertions.assertEquals("iklbydvkhb", model.tags().get("jdz")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagsResource model = new TagsResource() - .withTags(mapOf("cdl", "tswiby", "hfwpracstwit", "h", "nmdyodnwzxl", "khevxccedc", "nhltiugcxn", "jc")); + TagsResource model = new TagsResource().withTags(mapOf("jdz", "iklbydvkhb", "srhnjivo", "xcv")); model = BinaryData.fromObject(model).toObject(TagsResource.class); - Assertions.assertEquals("tswiby", model.tags().get("cdl")); + Assertions.assertEquals("iklbydvkhb", model.tags().get("jdz")); } // Use "Map.of" if available 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 index c70a5603c5122..39d56ec69eac7 100644 --- 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 @@ -15,28 +15,29 @@ public final class WindowsParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WindowsParameters model = BinaryData.fromString( - "{\"classificationsToInclude\":[\"Security\"],\"kbNumbersToInclude\":[\"eiotwmcdytdx\",\"it\",\"nrjawgqwg\"],\"kbNumbersToExclude\":[\"isk\"],\"excludeKbsRequiringReboot\":false,\"maxPatchPublishDate\":\"2021-01-05T02:20:26Z\"}") + "{\"classificationsToInclude\":[\"Tools\",\"Tools\"],\"kbNumbersToInclude\":[\"svshqjohx\"],\"kbNumbersToExclude\":[\"bfovasrruvwbhsq\",\"sub\"],\"excludeKbsRequiringReboot\":false,\"maxPatchPublishDate\":\"2021-02-04T22:06:27Z\"}") .toObject(WindowsParameters.class); - Assertions.assertEquals(VMGuestPatchClassificationWindows.SECURITY, model.classificationsToInclude().get(0)); - Assertions.assertEquals("eiotwmcdytdx", model.kbNumbersToInclude().get(0)); - Assertions.assertEquals("isk", model.kbNumbersToExclude().get(0)); + Assertions.assertEquals(VMGuestPatchClassificationWindows.TOOLS, model.classificationsToInclude().get(0)); + Assertions.assertEquals("svshqjohx", model.kbNumbersToInclude().get(0)); + Assertions.assertEquals("bfovasrruvwbhsq", model.kbNumbersToExclude().get(0)); Assertions.assertEquals(false, model.excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T02:20:26Z"), model.maxPatchPublishDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-04T22:06:27Z"), model.maxPatchPublishDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { WindowsParameters model = new WindowsParameters() - .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.SECURITY)) - .withKbNumbersToInclude(Arrays.asList("eiotwmcdytdx", "it", "nrjawgqwg")) - .withKbNumbersToExclude(Arrays.asList("isk")) + .withClassificationsToInclude( + Arrays.asList(VMGuestPatchClassificationWindows.TOOLS, VMGuestPatchClassificationWindows.TOOLS)) + .withKbNumbersToInclude(Arrays.asList("svshqjohx")) + .withKbNumbersToExclude(Arrays.asList("bfovasrruvwbhsq", "sub")) .withExcludeKbsRequiringReboot(false) - .withMaxPatchPublishDate(OffsetDateTime.parse("2021-01-05T02:20:26Z")); + .withMaxPatchPublishDate(OffsetDateTime.parse("2021-02-04T22:06:27Z")); model = BinaryData.fromObject(model).toObject(WindowsParameters.class); - Assertions.assertEquals(VMGuestPatchClassificationWindows.SECURITY, model.classificationsToInclude().get(0)); - Assertions.assertEquals("eiotwmcdytdx", model.kbNumbersToInclude().get(0)); - Assertions.assertEquals("isk", model.kbNumbersToExclude().get(0)); + Assertions.assertEquals(VMGuestPatchClassificationWindows.TOOLS, model.classificationsToInclude().get(0)); + Assertions.assertEquals("svshqjohx", model.kbNumbersToInclude().get(0)); + Assertions.assertEquals("bfovasrruvwbhsq", model.kbNumbersToExclude().get(0)); Assertions.assertEquals(false, model.excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-05T02:20:26Z"), model.maxPatchPublishDate()); + Assertions.assertEquals(OffsetDateTime.parse("2021-02-04T22:06:27Z"), model.maxPatchPublishDate()); } }