From 091c75cb45daedceef8059848e83b97c35bee8bc Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Tue, 23 Apr 2024 03:25:34 +0000 Subject: [PATCH] [Automation] Generate Fluent Lite from hybridcompute#package-preview-2023-10 --- .../CHANGELOG.md | 236 ++- .../README.md | 4 +- .../SAMPLE.md | 1003 ++++------ .../pom.xml | 16 +- .../hybridcompute/HybridComputeManager.java | 166 +- .../fluent/AgentVersionsClient.java | 67 - .../fluent/ExtensionMetadatasClient.java | 28 +- .../fluent/HybridComputeManagementClient.java | 61 +- .../fluent/HybridIdentityMetadatasClient.java | 81 - .../hybridcompute/fluent/LicensesClient.java | 315 --- .../fluent/MachineExtensionsClient.java | 96 +- ...ent.java => MachineRunCommandsClient.java} | 195 +- .../hybridcompute/fluent/MachinesClient.java | 61 +- .../fluent/NetworkProfilesClient.java | 8 +- .../fluent/OperationsClient.java | 8 +- .../PrivateEndpointConnectionsClient.java | 82 +- .../fluent/PrivateLinkResourcesClient.java | 28 +- .../fluent/PrivateLinkScopesClient.java | 88 +- .../fluent/ResourceProvidersClient.java | 34 +- .../fluent/models/AccessRuleProperties.java | 60 + .../fluent/models/AgentVersionInner.java | 102 - .../fluent/models/AgentVersionsListInner.java | 80 - .../models/EsuProfileUpdateProperties.java | 14 +- .../fluent/models/ExtensionValueInner.java | 20 +- .../models/ExtensionValueProperties.java | 16 +- .../HybridComputePrivateLinkScopeInner.java | 24 +- .../models/HybridIdentityMetadataInner.java | 123 -- .../HybridIdentityMetadataProperties.java | 95 - .../fluent/models/LicenseInner.java | 155 -- .../LicenseProfileArmEsuProperties.java | 14 +- ...nseProfileArmProductProfileProperties.java | 160 ++ .../fluent/models/LicenseProfileInner.java | 157 -- ...MachineInstanceViewEsuPropertiesInner.java | 85 - ...icenseProfileMachineInstanceViewInner.java | 54 - ...eMachineInstanceViewSoftwareAssurance.java | 57 + .../models/LicenseProfileProperties.java | 131 -- .../LicenseProfileUpdateProperties.java | 151 +- ...fileUpdatePropertiesSoftwareAssurance.java | 57 + .../fluent/models/LicenseProperties.java | 24 +- .../models/LicenseUpdateProperties.java | 36 +- ...LicenseUpdatePropertiesLicenseDetails.java | 30 +- .../MachineAssessPatchesResultInner.java | 43 +- .../fluent/models/MachineExtensionInner.java | 24 +- .../MachineExtensionUpdateProperties.java | 52 +- .../fluent/models/MachineInner.java | 143 +- .../MachineInstallPatchesResultInner.java | 46 +- .../fluent/models/MachinePropertiesInner.java | 135 +- .../fluent/models/MachineRunCommandInner.java | 386 ++++ .../models/MachineRunCommandProperties.java | 397 ++++ .../models/MachineUpdateProperties.java | 34 +- .../fluent/models/NetworkProfileInner.java | 14 +- .../fluent/models/OperationValueInner.java | 20 +- .../fluent/models/PatchSettings.java | 18 +- .../PrivateEndpointConnectionInner.java | 16 +- .../models/PrivateLinkResourceInner.java | 16 +- ...rivateLinkScopeValidationDetailsInner.java | 23 +- .../ProductProfileUpdateProperties.java | 114 ++ .../fluent/models/package-info.java | 5 +- .../hybridcompute/fluent/package-info.java | 5 +- .../implementation/AgentVersionImpl.java | 40 - .../AgentVersionsClientImpl.java | 289 --- .../implementation/AgentVersionsImpl.java | 82 - .../implementation/AgentVersionsListImpl.java | 52 - .../ExtensionMetadatasClientImpl.java | 257 +-- .../ExtensionMetadatasImpl.java | 28 +- .../implementation/ExtensionValueImpl.java | 4 +- .../HybridComputeManagementClientBuilder.java | 48 +- .../HybridComputeManagementClientImpl.java | 200 +- .../HybridComputePrivateLinkScopeImpl.java | 77 +- .../HybridIdentityMetadataImpl.java | 59 - .../HybridIdentityMetadatasClientImpl.java | 531 ----- .../HybridIdentityMetadatasImpl.java | 75 - .../implementation/LicenseImpl.java | 246 --- .../implementation/LicenseProfileImpl.java | 228 --- ...eMachineInstanceViewEsuPropertiesImpl.java | 77 - ...LicenseProfileMachineInstanceViewImpl.java | 40 - .../LicenseProfilesClientImpl.java | 1331 ------------- .../implementation/LicenseProfilesImpl.java | 159 -- .../implementation/LicensesClientImpl.java | 1754 ----------------- .../implementation/LicensesImpl.java | 187 -- .../MachineAssessPatchesResultImpl.java | 6 +- .../implementation/MachineExtensionImpl.java | 61 +- .../MachineExtensionsClientImpl.java | 811 +++----- .../implementation/MachineExtensionsImpl.java | 128 +- .../implementation/MachineImpl.java | 26 +- .../MachineInstallPatchesResultImpl.java | 3 +- .../implementation/MachinePropertiesImpl.java | 20 +- .../implementation/MachineRunCommandImpl.java | 281 +++ .../MachineRunCommandsClientImpl.java | 952 +++++++++ .../MachineRunCommandsImpl.java | 158 ++ .../implementation/MachinesClientImpl.java | 840 +++----- .../implementation/MachinesImpl.java | 50 +- .../implementation/NetworkProfileImpl.java | 4 +- .../NetworkProfilesClientImpl.java | 107 +- .../implementation/NetworkProfilesImpl.java | 12 +- .../implementation/OperationValueImpl.java | 4 +- .../implementation/OperationsClientImpl.java | 76 +- .../implementation/OperationsImpl.java | 10 +- .../PrivateEndpointConnectionImpl.java | 72 +- .../PrivateEndpointConnectionsClientImpl.java | 705 +++---- .../PrivateEndpointConnectionsImpl.java | 171 +- .../PrivateLinkResourceImpl.java | 3 +- .../PrivateLinkResourcesClientImpl.java | 332 ++-- .../PrivateLinkResourcesImpl.java | 32 +- ...PrivateLinkScopeValidationDetailsImpl.java | 3 +- .../PrivateLinkScopesClientImpl.java | 1027 ++++------ .../implementation/PrivateLinkScopesImpl.java | 156 +- .../{Utils.java => ResourceManagerUtils.java} | 23 +- .../ResourceProvidersClientImpl.java | 207 +- .../implementation/ResourceProvidersImpl.java | 14 +- .../implementation/package-info.java | 5 +- .../hybridcompute/models/AccessRule.java | 81 + .../models/AccessRuleDirection.java | 53 + .../models/AgentConfiguration.java | 29 +- .../models/AgentConfigurationMode.java | 14 +- .../hybridcompute/models/AgentUpgrade.java | 42 +- .../hybridcompute/models/AgentVersion.java | 38 - .../hybridcompute/models/AgentVersions.java | 59 - .../models/AgentVersionsList.java | 32 - .../hybridcompute/models/ArcKindEnum.java | 38 +- .../models/AssessmentModeTypes.java | 18 +- .../AvailablePatchCountByClassification.java | 28 +- .../hybridcompute/models/CloudMetadata.java | 12 +- .../models/ConfigurationExtension.java | 14 +- .../models/ConnectionDetail.java | 20 +- .../hybridcompute/models/EsuEligibility.java | 22 +- .../hybridcompute/models/EsuKey.java | 18 +- .../hybridcompute/models/EsuKeyState.java | 18 +- .../hybridcompute/models/EsuServerType.java | 18 +- .../hybridcompute/models/ExecutionState.java | 78 + .../models/ExtensionMetadatas.java | 28 +- .../models/ExtensionTargetProperties.java | 14 +- .../hybridcompute/models/ExtensionValue.java | 20 +- .../models/ExtensionValueListResult.java | 12 +- .../models/ExtensionsResourceStatus.java | 159 ++ .../models/ExtensionsStatusLevelTypes.java | 66 + .../models/HybridComputePrivateLinkScope.java | 99 +- ...bridComputePrivateLinkScopeListResult.java | 28 +- ...bridComputePrivateLinkScopeProperties.java | 31 +- .../models/HybridIdentityMetadata.java | 67 - .../models/HybridIdentityMetadataList.java | 89 - .../models/HybridIdentityMetadatas.java | 73 - .../hybridcompute/models/Identity.java | 18 +- .../models/InstanceViewTypes.java | 44 - .../hybridcompute/models/IpAddress.java | 20 +- .../models/LastAttemptStatusEnum.java | 18 +- .../hybridcompute/models/License.java | 403 +--- .../models/LicenseAssignmentState.java | 18 +- .../hybridcompute/models/LicenseCoreType.java | 18 +- .../hybridcompute/models/LicenseDetails.java | 34 +- .../hybridcompute/models/LicenseEdition.java | 18 +- .../hybridcompute/models/LicenseProfile.java | 288 --- ...rmEsuPropertiesWithoutAssignedLicense.java | 16 +- .../LicenseProfileMachineInstanceView.java | 246 ++- ...ofileMachineInstanceViewEsuProperties.java | 97 +- .../models/LicenseProfileProductType.java | 53 + ...censeProfileStorageModelEsuProperties.java | 14 +- .../LicenseProfileSubscriptionStatus.java | 63 + ...icenseProfileSubscriptionStatusUpdate.java | 54 + .../models/LicenseProfileUpdate.java | 115 +- .../models/LicenseProfilesListResult.java | 91 - .../hybridcompute/models/LicenseState.java | 18 +- .../hybridcompute/models/LicenseStatus.java | 78 + .../hybridcompute/models/LicenseTarget.java | 18 +- .../hybridcompute/models/LicenseType.java | 14 +- .../hybridcompute/models/LicenseUpdate.java | 40 +- .../hybridcompute/models/Licenses.java | 179 -- .../models/LicensesListResult.java | 91 - .../hybridcompute/models/LinuxParameters.java | 26 +- .../hybridcompute/models/LocationData.java | 31 +- .../hybridcompute/models/Machine.java | 98 +- .../models/MachineAssessPatchesResult.java | 29 +- .../models/MachineExtension.java | 170 +- .../models/MachineExtensionInstanceView.java | 26 +- .../MachineExtensionInstanceViewStatus.java | 30 +- .../models/MachineExtensionProperties.java | 58 +- .../models/MachineExtensionUpdate.java | 48 +- .../models/MachineExtensionUpgrade.java | 27 +- .../models/MachineExtensions.java | 30 +- .../models/MachineExtensionsListResult.java | 21 +- .../MachineInstallPatchesParameters.java | 50 +- .../models/MachineInstallPatchesResult.java | 36 +- .../models/MachineListResult.java | 26 +- .../models/MachineProperties.java | 80 +- .../models/MachineRunCommand.java | 690 +++++++ .../models/MachineRunCommandInstanceView.java | 241 +++ .../models/MachineRunCommandScriptSource.java | 146 ++ .../models/MachineRunCommandUpdate.java | 39 + ...eProfiles.java => MachineRunCommands.java} | 99 +- .../models/MachineRunCommandsListResult.java | 87 + .../hybridcompute/models/MachineUpdate.java | 48 +- .../hybridcompute/models/Machines.java | 40 +- .../models/NetworkInterface.java | 14 +- .../hybridcompute/models/NetworkProfile.java | 8 +- .../hybridcompute/models/NetworkProfiles.java | 8 +- .../hybridcompute/models/OSProfile.java | 20 +- .../models/OSProfileLinuxConfiguration.java | 20 +- .../models/OSProfileWindowsConfiguration.java | 20 +- .../models/OperationListResult.java | 12 +- .../hybridcompute/models/OperationValue.java | 14 +- .../models/OperationValueDisplay.java | 18 +- .../hybridcompute/models/Operations.java | 8 +- .../hybridcompute/models/OsType.java | 18 +- .../hybridcompute/models/PatchModeTypes.java | 26 +- .../models/PatchOperationStartedBy.java | 18 +- .../models/PatchOperationStatus.java | 26 +- .../models/PatchServiceUsed.java | 34 +- .../models/PrivateEndpointConnection.java | 70 +- .../PrivateEndpointConnectionDataModel.java | 20 +- .../PrivateEndpointConnectionListResult.java | 14 +- .../PrivateEndpointConnectionProperties.java | 22 +- .../models/PrivateEndpointConnections.java | 42 +- .../models/PrivateEndpointProperty.java | 14 +- .../models/PrivateLinkResource.java | 16 +- .../models/PrivateLinkResourceListResult.java | 14 +- .../models/PrivateLinkResourceProperties.java | 16 +- .../models/PrivateLinkResources.java | 28 +- .../PrivateLinkScopeValidationDetails.java | 12 +- .../models/PrivateLinkScopes.java | 66 +- .../models/PrivateLinkScopesResource.java | 18 +- ...ateLinkServiceConnectionStateProperty.java | 34 +- .../hybridcompute/models/ProductFeature.java | 126 ++ .../models/ProductFeatureUpdate.java | 80 + .../models/ProvisioningIssueSeverity.java | 53 + .../models/ProvisioningIssueType.java | 66 + .../models/ProvisioningState.java | 42 +- .../models/PublicNetworkAccessType.java | 14 +- .../models/ResourceIdentityType.java | 18 +- .../models/ResourceProviders.java | 19 +- .../hybridcompute/models/ResourceUpdate.java | 14 +- .../models/RunCommandInputParameter.java | 91 + .../models/RunCommandManagedIdentity.java | 90 + .../hybridcompute/models/ServiceStatus.java | 18 +- .../hybridcompute/models/ServiceStatuses.java | 18 +- .../models/StatusLevelTypes.java | 22 +- .../hybridcompute/models/StatusTypes.java | 22 +- .../hybridcompute/models/Subnet.java | 14 +- .../hybridcompute/models/TagsResource.java | 10 +- .../VMGuestPatchClassificationLinux.java | 22 +- .../VMGuestPatchClassificationWindows.java | 42 +- .../models/VMGuestPatchRebootSetting.java | 22 +- .../models/VMGuestPatchRebootStatus.java | 34 +- .../models/WindowsParameters.java | 34 +- .../hybridcompute/models/package-info.java | 5 +- .../hybridcompute/package-info.java | 5 +- .../src/main/java/module-info.java | 12 +- .../proxy-config.json | 2 +- .../reflect-config.json | 234 ++- .../generated/AgentVersionGetSamples.java | 20 - .../generated/AgentVersionListSamples.java | 20 - .../ExtensionMetadataGetSamples.java | 17 +- .../ExtensionMetadataListSamples.java | 11 +- .../HybridIdentityMetadataGetSamples.java | 22 - ...IdentityMetadataListByMachinesSamples.java | 21 - .../LicenseProfilesCreateOrUpdateSamples.java | 27 - .../LicenseProfilesDeleteSamples.java | 20 - .../generated/LicenseProfilesGetSamples.java | 20 - .../generated/LicenseProfilesListSamples.java | 20 - .../LicenseProfilesUpdateSamples.java | 27 - .../LicensesCreateOrUpdateSamples.java | 40 - .../generated/LicensesDeleteSamples.java | 20 - .../LicensesGetByResourceGroupSamples.java | 22 - .../LicensesListByResourceGroupSamples.java | 20 - .../generated/LicensesListSamples.java | 21 - .../generated/LicensesUpdateSamples.java | 40 - .../LicensesValidateLicenseSamples.java | 41 - ...achineExtensionsCreateOrUpdateSamples.java | 24 +- .../MachineExtensionsDeleteSamples.java | 8 +- .../MachineExtensionsGetSamples.java | 11 +- .../MachineExtensionsListSamples.java | 12 +- .../MachineExtensionsUpdateSamples.java | 24 +- ...chineRunCommandsCreateOrUpdateSamples.java | 40 + .../MachineRunCommandsDeleteSamples.java | 23 + .../MachineRunCommandsGetSamples.java | 23 + .../MachineRunCommandsListSamples.java | 22 + .../MachinesAssessPatchesSamples.java | 12 +- .../generated/MachinesDeleteSamples.java | 11 +- .../MachinesGetByResourceGroupSamples.java | 28 +- .../MachinesInstallPatchesSamples.java | 35 +- .../MachinesListByResourceGroupSamples.java | 12 +- .../generated/MachinesListSamples.java | 12 +- .../generated/NetworkProfileGetSamples.java | 8 +- .../generated/OperationsListSamples.java | 12 +- ...pointConnectionsCreateOrUpdateSamples.java | 20 +- ...ivateEndpointConnectionsDeleteSamples.java | 16 +- .../PrivateEndpointConnectionsGetSamples.java | 20 +- ...nectionsListByPrivateLinkScopeSamples.java | 11 +- .../PrivateLinkResourcesGetSamples.java | 19 +- ...esourcesListByPrivateLinkScopeSamples.java | 15 +- ...rivateLinkScopesCreateOrUpdateSamples.java | 18 +- .../PrivateLinkScopesDeleteSamples.java | 11 +- ...teLinkScopesGetByResourceGroupSamples.java | 15 +- ...GetValidationDetailsForMachineSamples.java | 15 +- ...LinkScopesGetValidationDetailsSamples.java | 15 +- ...eLinkScopesListByResourceGroupSamples.java | 12 +- .../PrivateLinkScopesListSamples.java | 8 +- .../PrivateLinkScopesUpdateTagsSamples.java | 22 +- ...ourceProviderUpgradeExtensionsSamples.java | 25 +- .../generated/AccessRulePropertiesTests.java | 23 + .../generated/AccessRuleTests.java | 23 + .../generated/AgentConfigurationTests.java | 8 +- .../generated/AgentUpgradeTests.java | 25 +- .../generated/AgentVersionInnerTests.java | 32 - ...AgentVersionsGetWithResponseMockTests.java | 68 - .../AgentVersionsListInnerTests.java | 53 - ...gentVersionsListWithResponseMockTests.java | 70 - ...ilablePatchCountByClassificationTests.java | 8 +- .../generated/CloudMetadataTests.java | 2 +- .../ConfigurationExtensionTests.java | 6 +- .../generated/ConnectionDetailTests.java | 8 +- .../hybridcompute/generated/EsuKeyTests.java | 13 +- .../EsuProfileUpdatePropertiesTests.java | 12 +- ...sionMetadatasGetWithResponseMockTests.java | 55 +- .../ExtensionMetadatasListMockTests.java | 50 +- .../ExtensionTargetPropertiesTests.java | 10 +- .../generated/ExtensionValueInnerTests.java | 8 +- .../ExtensionValueListResultTests.java | 8 +- .../ExtensionValuePropertiesTests.java | 7 +- ...bridComputePrivateLinkScopeInnerTests.java | 28 +- ...omputePrivateLinkScopeListResultTests.java | 74 +- ...omputePrivateLinkScopePropertiesTests.java | 16 +- .../generated/IdentityTests.java | 6 +- .../generated/IpAddressTests.java | 19 +- .../generated/LicenseDetailsTests.java | 33 +- .../generated/LicenseInnerTests.java | 78 - ...ofileArmProductProfilePropertiesTests.java | 49 + ...ineInstanceViewSoftwareAssuranceTests.java | 27 + ...pdatePropertiesSoftwareAssuranceTests.java | 27 + .../LicenseProfileUpdatePropertiesTests.java | 40 +- .../generated/LicenseProfileUpdateTests.java | 48 +- .../generated/LicensePropertiesTests.java | 40 +- .../hybridcompute/generated/LicenseTests.java | 70 + ...seUpdatePropertiesLicenseDetailsTests.java | 24 +- .../LicenseUpdatePropertiesTests.java | 43 +- .../generated/LicenseUpdateTests.java | 38 +- .../LicensesCreateOrUpdateMockTests.java | 112 -- .../generated/LicensesDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 85 - .../LicensesListByResourceGroupMockTests.java | 84 - .../generated/LicensesListMockTests.java | 83 - .../generated/LicensesListResultTests.java | 87 - .../LicensesValidateLicenseMockTests.java | 113 -- .../generated/LinuxParametersTests.java | 30 +- .../generated/LocationDataTests.java | 34 +- .../MachineAssessPatchesResultInnerTests.java | 13 +- ...MachineExtensionUpdatePropertiesTests.java | 44 +- .../MachineExtensionUpdateTests.java | 64 +- .../MachineExtensionUpgradeTests.java | 24 +- .../MachineExtensionsDeleteMockTests.java | 46 +- .../MachineInstallPatchesParametersTests.java | 106 +- ...MachineInstallPatchesResultInnerTests.java | 8 +- .../MachineRunCommandScriptSourceTests.java | 39 + .../MachineRunCommandUpdateTests.java | 42 + .../MachineRunCommandsDeleteMockTests.java | 33 + .../MachineUpdatePropertiesTests.java | 117 +- .../generated/MachineUpdateTests.java | 137 +- .../MachinesAssessPatchesMockTests.java | 50 +- ...eByResourceGroupWithResponseMockTests.java | 45 +- .../MachinesInstallPatchesMockTests.java | 95 +- .../generated/NetworkInterfaceTests.java | 24 +- .../generated/NetworkProfileInnerTests.java | 60 +- ...tworkProfilesGetWithResponseMockTests.java | 63 +- .../OSProfileLinuxConfigurationTests.java | 19 +- .../generated/OSProfileTests.java | 43 +- .../OSProfileWindowsConfigurationTests.java | 23 +- .../generated/OperationListResultTests.java | 8 +- .../generated/OperationValueDisplayTests.java | 8 +- .../generated/OperationValueInnerTests.java | 8 +- .../generated/OperationsListMockTests.java | 48 +- .../generated/PatchSettingsTests.java | 19 +- ...ivateEndpointConnectionDataModelTests.java | 34 +- .../PrivateEndpointConnectionInnerTests.java | 37 +- ...vateEndpointConnectionListResultTests.java | 8 +- ...vateEndpointConnectionPropertiesTests.java | 31 +- ...intConnectionsCreateOrUpdateMockTests.java | 82 +- ...ateEndpointConnectionsDeleteMockTests.java | 47 +- ...ntConnectionsGetWithResponseMockTests.java | 67 +- ...ctionsListByPrivateLinkScopeMockTests.java | 71 +- .../PrivateEndpointPropertyTests.java | 10 +- .../PrivateLinkResourceInnerTests.java | 12 +- .../PrivateLinkResourceListResultTests.java | 8 +- .../PrivateLinkResourcePropertiesTests.java | 8 +- ...LinkResourcesGetWithResponseMockTests.java | 54 +- ...ourcesListByPrivateLinkScopeMockTests.java | 50 +- ...eLinkScopeValidationDetailsInnerTests.java | 21 +- ...esCreateOrUpdateWithResponseMockTests.java | 78 +- .../PrivateLinkScopesDeleteMockTests.java | 44 +- ...tByResourceGroupWithResponseMockTests.java | 65 +- ...etailsForMachineWithResponseMockTests.java | 59 +- ...alidationDetailsWithResponseMockTests.java | 59 +- ...inkScopesListByResourceGroupMockTests.java | 66 +- .../PrivateLinkScopesListMockTests.java | 66 +- .../PrivateLinkScopesResourceTests.java | 31 +- ...nkServiceConnectionStatePropertyTests.java | 18 +- .../generated/ProductFeatureTests.java | 30 + .../generated/ProductFeatureUpdateTests.java | 29 + .../ProductProfileUpdatePropertiesTests.java | 42 + ...ceProvidersUpgradeExtensionsMockTests.java | 56 +- .../generated/ResourceUpdateTests.java | 10 +- .../RunCommandInputParameterTests.java | 27 + .../RunCommandManagedIdentityTests.java | 28 + .../generated/ServiceStatusTests.java | 16 +- .../generated/ServiceStatusesTests.java | 31 +- .../hybridcompute/generated/SubnetTests.java | 8 +- .../generated/TagsResourceTests.java | 10 +- .../generated/WindowsParametersTests.java | 44 +- 406 files changed, 12785 insertions(+), 17699 deletions(-) delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/AgentVersionsClient.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/HybridIdentityMetadatasClient.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicensesClient.java rename sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/{LicenseProfilesClient.java => MachineRunCommandsClient.java} (52%) create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AccessRuleProperties.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AgentVersionInner.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AgentVersionsListInner.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridIdentityMetadataInner.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridIdentityMetadataProperties.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseInner.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmProductProfileProperties.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileInner.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewEsuPropertiesInner.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewInner.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewSoftwareAssurance.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileProperties.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdatePropertiesSoftwareAssurance.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/ProductProfileUpdateProperties.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsClientImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsListImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadataImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadatasClientImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadatasImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewEsuPropertiesImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesClientImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesClientImpl.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesImpl.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 rename sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/{Utils.java => ResourceManagerUtils.java} (90%) create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRule.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRuleDirection.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersion.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersions.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersionsList.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 delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadata.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadataList.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadatas.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/InstanceViewTypes.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfile.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileProductType.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatus.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatusUpdate.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfilesListResult.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseStatus.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Licenses.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicensesListResult.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 rename sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/{LicenseProfiles.java => MachineRunCommands.java} (65%) 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/ProductFeature.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeatureUpdate.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueSeverity.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueType.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 delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionGetSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionListSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/HybridIdentityMetadataGetSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/HybridIdentityMetadataListByMachinesSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesCreateOrUpdateSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesDeleteSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesGetSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesListSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesUpdateSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesUpdateSamples.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseSamples.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/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRulePropertiesTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRuleTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionInnerTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsGetWithResponseMockTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsListInnerTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsListWithResponseMockTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseInnerTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileArmProductProfilePropertiesTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileMachineInstanceViewSoftwareAssuranceTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdatePropertiesSoftwareAssuranceTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateMockTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteMockTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupMockTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListMockTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListResultTests.java delete mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseMockTests.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/MachineRunCommandsDeleteMockTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductFeatureTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductFeatureUpdateTests.java create mode 100644 sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductProfileUpdatePropertiesTests.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 diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md index 866c00e7538a..f3bebcc4ad1a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/CHANGELOG.md @@ -1,14 +1,242 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.4 (2024-04-23) -### Features Added +- 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-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +* `models.AgentVersion` was removed + +* `models.LicenseProfile$DefinitionStages` was removed + +* `models.LicenseProfiles` was removed + +* `models.Licenses` was removed + +* `models.License$Definition` was removed + +* `models.HybridIdentityMetadatas` was removed + +* `models.HybridIdentityMetadata` was removed + +* `models.LicenseProfilesListResult` was removed + +* `models.License$UpdateStages` was removed + +* `models.LicenseProfile` was removed + +* `models.LicenseProfile$Definition` was removed + +* `models.LicenseProfile$UpdateStages` was removed + +* `models.LicenseProfile$Update` was removed + +* `models.AgentVersionsList` was removed + +* `models.HybridIdentityMetadataList` was removed + +* `models.License$Update` was removed + +* `models.LicensesListResult` was removed + +* `models.License$DefinitionStages` was removed + +* `models.AgentVersions` was removed + +* `models.InstanceViewTypes` was removed + +#### `models.AgentUpgrade` was modified + +* `java.lang.String lastAttemptTimestamp()` -> `java.time.OffsetDateTime lastAttemptTimestamp()` +* `java.lang.String correlationId()` -> `java.util.UUID correlationId()` +* `withCorrelationId(java.lang.String)` was removed + +#### `models.LicenseProfileMachineInstanceViewEsuProperties` was modified + +* `esuEligibility()` was removed +* `models.License assignedLicense()` -> `models.License assignedLicense()` +* `models.LicenseAssignmentState licenseAssignmentState()` -> `models.LicenseAssignmentState licenseAssignmentState()` +* `assignedLicenseImmutableId()` was removed +* `serverType()` was removed +* `innerModel()` was removed +* `esuKeys()` was removed +* `esuKeyState()` was removed + +#### `models.MachineProperties` was modified + +* `java.lang.String vmUuid()` -> `java.util.UUID vmUuid()` +* `java.lang.String vmId()` -> `java.util.UUID vmId()` + +#### `models.LicenseProfileMachineInstanceView` was modified + +* `models.LicenseProfileMachineInstanceViewEsuProperties esuProfile()` -> `models.LicenseProfileMachineInstanceViewEsuProperties esuProfile()` +* `innerModel()` was removed + +#### `models.License` was modified + +* `update()` was removed +* `location()` was removed +* `java.lang.String tenantId()` -> `java.lang.String tenantId()` +* `refresh(com.azure.core.util.Context)` was removed +* `refresh()` was removed +* `models.LicenseDetails licenseDetails()` -> `models.LicenseDetails licenseDetails()` +* `type()` was removed +* `region()` was removed +* `name()` was removed +* `id()` was removed +* `models.LicenseType licenseType()` -> `models.LicenseType licenseType()` +* `regionName()` was removed +* `innerModel()` was removed +* `resourceGroupName()` was removed +* `tags()` was removed +* `models.ProvisioningState provisioningState()` -> `models.ProvisioningState provisioningState()` +* `com.azure.core.management.SystemData systemData()` -> `com.azure.core.management.SystemData systemData()` + +#### `models.Machines` was modified + +* `getByResourceGroupWithResponse(java.lang.String,java.lang.String,models.InstanceViewTypes,com.azure.core.util.Context)` was removed + +#### `models.MachineInstallPatchesParameters` was modified + +* `withMaximumDuration(java.lang.String)` was removed +* `java.lang.String maximumDuration()` -> `java.time.Duration maximumDuration()` + +#### `models.Machine` was modified + +* `java.lang.String vmId()` -> `java.util.UUID vmId()` +* `java.lang.String vmUuid()` -> `java.util.UUID vmUuid()` + +#### `HybridComputeManager` was modified + +* `hybridIdentityMetadatas()` was removed +* `licenseProfiles()` was removed +* `agentVersions()` was removed +* `licenses()` was removed + +#### `models.MachineAssessPatchesResult` was modified + +* `java.lang.String assessmentActivityId()` -> `java.util.UUID assessmentActivityId()` + +### Features Added + +* `models.MachineRunCommandsListResult` was added + +* `models.LicenseProfileSubscriptionStatusUpdate` was added + +* `models.MachineRunCommand$UpdateStages` was added + +* `models.AccessRuleDirection` was added + +* `models.MachineRunCommand` was added + +* `models.MachineRunCommandUpdate` was added + +* `models.AccessRule` was added + +* `models.ProductFeature` was added + +* `models.MachineRunCommand$Update` was added + +* `models.ProvisioningIssueType` was added + +* `models.LicenseProfileSubscriptionStatus` was added + +* `models.MachineRunCommand$Definition` was added + +* `models.ExtensionsStatusLevelTypes` was added + +* `models.LicenseProfileProductType` was added + +* `models.ExtensionsResourceStatus` was added + +* `models.MachineRunCommandInstanceView` was added + +* `models.LicenseStatus` was added + +* `models.RunCommandManagedIdentity` was added + +* `models.MachineRunCommands` was added + +* `models.ProductFeatureUpdate` was added + +* `models.MachineRunCommandScriptSource` was added + +* `models.RunCommandInputParameter` was added + +* `models.ProvisioningIssueSeverity` was added + +* `models.MachineRunCommand$DefinitionStages` was added + +* `models.ExecutionState` was added + +#### `models.AgentUpgrade` was modified + +* `withCorrelationId(java.util.UUID)` was added + +#### `models.LicenseProfileMachineInstanceViewEsuProperties` was modified + +* `withLicenseAssignmentState(models.LicenseAssignmentState)` was added +* `validate()` was added +* `withAssignedLicense(models.License)` was added + +#### `models.LicenseProfileUpdate` was modified + +* `withProductFeatures(java.util.List)` was added +* `subscriptionStatus()` was added +* `withSubscriptionStatus(models.LicenseProfileSubscriptionStatusUpdate)` was added +* `productType()` was added +* `withSoftwareAssuranceCustomer(java.lang.Boolean)` was added +* `productFeatures()` was added +* `withProductType(models.LicenseProfileProductType)` was added +* `softwareAssuranceCustomer()` was added + +#### `models.MachineProperties` was modified + +* `osEdition()` was added + +#### `models.LicenseProfileMachineInstanceView` was modified + +* `billingStartDate()` was added +* `productFeatures()` was added +* `disenrollmentDate()` was added +* `withEsuProfile(models.LicenseProfileMachineInstanceViewEsuProperties)` was added +* `validate()` was added +* `productType()` was added +* `withProductFeatures(java.util.List)` was added +* `withSoftwareAssuranceCustomer(java.lang.Boolean)` was added +* `enrollmentDate()` was added +* `subscriptionStatus()` was added +* `licenseChannel()` was added +* `withProductType(models.LicenseProfileProductType)` was added +* `withSubscriptionStatus(models.LicenseProfileSubscriptionStatus)` was added +* `softwareAssuranceCustomer()` was added +* `licenseStatus()` was added + +#### `models.License` was modified + +* `validate()` was added +* `withTags(java.util.Map)` was added +* `withLicenseDetails(models.LicenseDetails)` was added +* `withLicenseType(models.LicenseType)` was added +* `withTenantId(java.lang.String)` was added +* `withLocation(java.lang.String)` was added + +#### `models.Machines` was modified + +* `getByResourceGroupWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.MachineInstallPatchesParameters` was modified + +* `withMaximumDuration(java.time.Duration)` was added + +#### `models.Machine` was modified + +* `osEdition()` was added + +#### `HybridComputeManager` was modified -### Other Changes +* `machineRunCommands()` was added ## 1.0.0-beta.3 (2023-11-16) diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/README.md b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/README.md index d42f2152eaab..66c2aab10b70 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-preview-2023-06. 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-2023-10. 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-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md index 93245fd140fd..dea9c37a1752 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/SAMPLE.md @@ -1,39 +1,11 @@ # Code snippets and samples -## AgentVersion - -- [Get](#agentversion_get) -- [List](#agentversion_list) - ## ExtensionMetadata - [Get](#extensionmetadata_get) - [List](#extensionmetadata_list) -## HybridIdentityMetadata - -- [Get](#hybrididentitymetadata_get) -- [ListByMachines](#hybrididentitymetadata_listbymachines) - -## LicenseProfiles - -- [CreateOrUpdate](#licenseprofiles_createorupdate) -- [Delete](#licenseprofiles_delete) -- [Get](#licenseprofiles_get) -- [List](#licenseprofiles_list) -- [Update](#licenseprofiles_update) - -## Licenses - -- [CreateOrUpdate](#licenses_createorupdate) -- [Delete](#licenses_delete) -- [GetByResourceGroup](#licenses_getbyresourcegroup) -- [List](#licenses_list) -- [ListByResourceGroup](#licenses_listbyresourcegroup) -- [Update](#licenses_update) -- [ValidateLicense](#licenses_validatelicense) - ## MachineExtensions - [CreateOrUpdate](#machineextensions_createorupdate) @@ -42,6 +14,13 @@ - [List](#machineextensions_list) - [Update](#machineextensions_update) +## MachineRunCommands + +- [CreateOrUpdate](#machineruncommands_createorupdate) +- [Delete](#machineruncommands_delete) +- [Get](#machineruncommands_get) +- [List](#machineruncommands_list) + ## Machines - [AssessPatches](#machines_assesspatches) @@ -85,65 +64,24 @@ ## ResourceProvider - [UpgradeExtensions](#resourceprovider_upgradeextensions) -### AgentVersion_Get - -```java -/** Samples for AgentVersion Get. */ -public final class AgentVersionGetSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/AgentVersion_GetLatest.json - */ - /** - * Sample code: GET Agent Versions. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void gETAgentVersions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.agentVersions().getWithResponse("myOsType", "1.27", com.azure.core.util.Context.NONE); - } -} -``` - -### AgentVersion_List - -```java -/** Samples for AgentVersion List. */ -public final class AgentVersionListSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/AgentVersions_Get.json - */ - /** - * Sample code: GET Agent Versions. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void gETAgentVersions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.agentVersions().listWithResponse("myOsType", com.azure.core.util.Context.NONE); - } -} -``` - ### ExtensionMetadata_Get ```java -/** Samples for ExtensionMetadata Get. */ +/** + * Samples for ExtensionMetadata Get. + */ public final class ExtensionMetadataGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/ExtensionMetadata_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/ExtensionMetadata_Get.json */ /** * Sample code: GET an extensions metadata. - * + * * @param manager Entry point to HybridComputeManager. */ public static void gETAnExtensionsMetadata(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .extensionMetadatas() - .getWithResponse( - "EastUS", - "microsoft.azure.monitor", - "azuremonitorlinuxagent", - "1.9.1", + manager.extensionMetadatas() + .getWithResponse("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", "1.9.1", com.azure.core.util.Context.NONE); } } @@ -152,371 +90,25 @@ public final class ExtensionMetadataGetSamples { ### ExtensionMetadata_List ```java -/** Samples for ExtensionMetadata List. */ +/** + * Samples for ExtensionMetadata List. + */ public final class ExtensionMetadataListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/ExtensionMetadata_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/ExtensionMetadata_List.json */ /** * Sample code: GET a list of extensions. - * + * * @param manager Entry point to HybridComputeManager. */ public static void gETAListOfExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .extensionMetadatas() + manager.extensionMetadatas() .list("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", com.azure.core.util.Context.NONE); } } ``` -### HybridIdentityMetadata_Get - -```java -/** Samples for HybridIdentityMetadata Get. */ -public final class HybridIdentityMetadataGetSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/HybridIdentityMetadata_Get.json - */ - /** - * Sample code: GetHybridIdentityMetadata. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void getHybridIdentityMetadata(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .hybridIdentityMetadatas() - .getWithResponse("testrg", "ContosoVm", "default", com.azure.core.util.Context.NONE); - } -} -``` - -### HybridIdentityMetadata_ListByMachines - -```java -/** Samples for HybridIdentityMetadata ListByMachines. */ -public final class HybridIdentityMetadataListByMachinesSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/HybridIdentityMetadata_ListByVirtualMachines.json - */ - /** - * Sample code: HybridIdentityMetadataListByVirtualMachines. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void hybridIdentityMetadataListByVirtualMachines( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.hybridIdentityMetadatas().listByMachines("testrg", "ContosoVm", com.azure.core.util.Context.NONE); - } -} -``` - -### LicenseProfiles_CreateOrUpdate - -```java -/** Samples for LicenseProfiles CreateOrUpdate. */ -public final class LicenseProfilesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update a License Profile. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void createOrUpdateALicenseProfile( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .licenseProfiles() - .define() - .withRegion("eastus2euap") - .withExistingMachine("myResourceGroup", "myMachine") - .withAssignedLicense("{LicenseResourceId}") - .create(); - } -} -``` - -### LicenseProfiles_Delete - -```java -/** Samples for LicenseProfiles Delete. */ -public final class LicenseProfilesDeleteSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_Delete.json - */ - /** - * Sample code: Delete a License Profile. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void deleteALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenseProfiles().delete("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); - } -} -``` - -### LicenseProfiles_Get - -```java -/** Samples for LicenseProfiles Get. */ -public final class LicenseProfilesGetSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_Get.json - */ - /** - * Sample code: Get License Profile. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void getLicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenseProfiles().getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); - } -} -``` - -### LicenseProfiles_List - -```java -/** Samples for LicenseProfiles List. */ -public final class LicenseProfilesListSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_List.json - */ - /** - * Sample code: List all License Profiles. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void listAllLicenseProfiles(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenseProfiles().list("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); - } -} -``` - -### LicenseProfiles_Update - -```java -import com.azure.resourcemanager.hybridcompute.models.LicenseProfile; - -/** Samples for LicenseProfiles Update. */ -public final class LicenseProfilesUpdateSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_Update.json - */ - /** - * Sample code: Update a License Profile. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void updateALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - LicenseProfile resource = - manager - .licenseProfiles() - .getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withAssignedLicense("{LicenseResourceId}").apply(); - } -} -``` - -### Licenses_CreateOrUpdate - -```java -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; - -/** Samples for Licenses CreateOrUpdate. */ -public final class LicensesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update a License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void createOrUpdateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .licenses() - .define("{licenseName}") - .withRegion("eastus2euap") - .withExistingResourceGroup("myResourceGroup") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails( - new LicenseDetails() - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(6)) - .create(); - } -} -``` - -### Licenses_Delete - -```java -/** Samples for Licenses Delete. */ -public final class LicensesDeleteSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_Delete.json - */ - /** - * Sample code: Delete a License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void deleteALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses().delete("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE); - } -} -``` - -### Licenses_GetByResourceGroup - -```java -/** Samples for Licenses GetByResourceGroup. */ -public final class LicensesGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_Get.json - */ - /** - * Sample code: Get License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void getLicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .licenses() - .getByResourceGroupWithResponse("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE); - } -} -``` - -### Licenses_List - -```java -/** Samples for Licenses List. */ -public final class LicensesListSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_ListBySubscription.json - */ - /** - * Sample code: List Licenses by Subscription. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void listLicensesBySubscription( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses().list(com.azure.core.util.Context.NONE); - } -} -``` - -### Licenses_ListByResourceGroup - -```java -/** Samples for Licenses ListByResourceGroup. */ -public final class LicensesListByResourceGroupSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_ListByResourceGroup.json - */ - /** - * Sample code: GET all Machine Extensions. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void gETAllMachineExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); - } -} -``` - -### Licenses_Update - -```java -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; - -/** Samples for Licenses Update. */ -public final class LicensesUpdateSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_Update.json - */ - /** - * Sample code: Update a License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void updateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - License resource = - manager - .licenses() - .getByResourceGroupWithResponse("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withLicenseType(LicenseType.ESU) - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(6) - .apply(); - } -} -``` - -### Licenses_ValidateLicense - -```java -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; - -/** Samples for Licenses ValidateLicense. */ -public final class LicensesValidateLicenseSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_ValidateLicense.json - */ - /** - * Sample code: Validate a License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void validateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .licenses() - .validateLicense( - new LicenseInner() - .withLocation("eastus2euap") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails( - new LicenseDetails() - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(6)), - com.azure.core.util.Context.NONE); - } -} -``` - ### MachineExtensions_CreateOrUpdate ```java @@ -524,32 +116,30 @@ import com.azure.resourcemanager.hybridcompute.models.MachineExtensionProperties import java.util.HashMap; import java.util.Map; -/** Samples for MachineExtensions CreateOrUpdate. */ +/** + * Samples for MachineExtensions CreateOrUpdate. + */ public final class MachineExtensionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_CreateOrUpdate.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_CreateOrUpdate.json */ /** * Sample code: Create or Update a Machine Extension. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void createOrUpdateAMachineExtension( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machineExtensions() + public static void + createOrUpdateAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineExtensions() .define("CustomScriptExtension") .withRegion("eastus2euap") .withExistingMachine("myResourceGroup", "myMachine") .withProperties( - new MachineExtensionProperties() - .withPublisher("Microsoft.Compute") + new MachineExtensionProperties().withPublisher("Microsoft.Compute") .withType("CustomScriptExtension") .withTypeHandlerVersion("1.10") - .withSettings( - mapOf( - "commandToExecute", - "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\""))) + .withSettings(mapOf("commandToExecute", + "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\""))) .create(); } @@ -570,14 +160,16 @@ public final class MachineExtensionsCreateOrUpdateSamples { ### MachineExtensions_Delete ```java -/** Samples for MachineExtensions Delete. */ +/** + * Samples for MachineExtensions Delete. + */ public final class MachineExtensionsDeleteSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_Delete.json */ /** * Sample code: Delete a Machine Extension. - * + * * @param manager Entry point to HybridComputeManager. */ public static void deleteAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { @@ -589,19 +181,20 @@ public final class MachineExtensionsDeleteSamples { ### MachineExtensions_Get ```java -/** Samples for MachineExtensions Get. */ +/** + * Samples for MachineExtensions Get. + */ public final class MachineExtensionsGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_Get.json */ /** * Sample code: GET Machine Extension. - * + * * @param manager Entry point to HybridComputeManager. */ public static void gETMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machineExtensions() + manager.machineExtensions() .getWithResponse("myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE); } } @@ -610,18 +203,20 @@ public final class MachineExtensionsGetSamples { ### MachineExtensions_List ```java -/** Samples for MachineExtensions List. */ +/** + * Samples for MachineExtensions List. + */ public final class MachineExtensionsListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_List.json */ /** * Sample code: GET all Machine Extensions - List. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void gETAllMachineExtensionsList( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + gETAllMachineExtensionsList(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.machineExtensions().list("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE); } } @@ -634,26 +229,24 @@ import com.azure.resourcemanager.hybridcompute.models.MachineExtension; import java.util.HashMap; import java.util.Map; -/** Samples for MachineExtensions Update. */ +/** + * Samples for MachineExtensions Update. + */ public final class MachineExtensionsUpdateSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_Update.json */ /** * Sample code: Create or Update a Machine Extension. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void createOrUpdateAMachineExtension( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - MachineExtension resource = - manager - .machineExtensions() - .getWithResponse( - "myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + createOrUpdateAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + MachineExtension resource = manager.machineExtensions() + .getWithResponse("myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withPublisher("Microsoft.Compute") .withType("CustomScriptExtension") .withTypeHandlerVersion("1.10") @@ -677,21 +270,127 @@ 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/2023-10-03-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/2023-10-03-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/2023-10-03-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/2023-10-03-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 -/** Samples for Machines AssessPatches. */ +/** + * Samples for Machines AssessPatches. + */ public final class MachinesAssessPatchesSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machine_AssessPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machine_AssessPatches.json */ /** * Sample code: Assess patch state of a machine. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void assessPatchStateOfAMachine( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + assessPatchStateOfAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.machines().assessPatches("myResourceGroupName", "myMachineName", com.azure.core.util.Context.NONE); } } @@ -700,19 +399,20 @@ public final class MachinesAssessPatchesSamples { ### Machines_Delete ```java -/** Samples for Machines Delete. */ +/** + * Samples for Machines Delete. + */ public final class MachinesDeleteSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Delete.json */ /** * Sample code: Delete a Machine. - * + * * @param manager Entry point to HybridComputeManager. */ public static void deleteAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machines() + manager.machines() .deleteByResourceGroupWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); } } @@ -721,37 +421,35 @@ public final class MachinesDeleteSamples { ### Machines_GetByResourceGroup ```java -import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; - -/** Samples for Machines GetByResourceGroup. */ +/** + * Samples for Machines GetByResourceGroup. + */ public final class MachinesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json */ /** * Sample code: Get Machine with License Profile Instance View. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void getMachineWithLicenseProfileInstanceView( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machines() - .getByResourceGroupWithResponse( - "myResourceGroup", "myMachine", InstanceViewTypes.INSTANCE_VIEW, com.azure.core.util.Context.NONE); + public static void + getMachineWithLicenseProfileInstanceView(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines() + .getByResourceGroupWithResponse("myResourceGroup", "myMachine", "instanceView", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Get.json */ /** * Sample code: Get Machine. - * + * * @param manager Entry point to HybridComputeManager. */ public static void getMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machines() + manager.machines() .getByResourceGroupWithResponse("myResourceGroup", "myMachine", null, com.azure.core.util.Context.NONE); } } @@ -764,37 +462,32 @@ import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParam import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationWindows; import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchRebootSetting; import com.azure.resourcemanager.hybridcompute.models.WindowsParameters; +import java.time.Duration; import java.time.OffsetDateTime; import java.util.Arrays; -/** Samples for Machines InstallPatches. */ +/** + * Samples for Machines InstallPatches. + */ public final class MachinesInstallPatchesSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machine_InstallPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machine_InstallPatches.json */ /** * Sample code: Install patch state of a machine. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void installPatchStateOfAMachine( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machines() - .installPatches( - "myResourceGroupName", - "myMachineName", - new MachineInstallPatchesParameters() - .withMaximumDuration("PT4H") + public static void + installPatchStateOfAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines() + .installPatches("myResourceGroupName", "myMachineName", + new MachineInstallPatchesParameters().withMaximumDuration(Duration.parse("PT4H")) .withRebootSetting(VMGuestPatchRebootSetting.IF_REQUIRED) - .withWindowsParameters( - new WindowsParameters() - .withClassificationsToInclude( - Arrays - .asList( - VMGuestPatchClassificationWindows.CRITICAL, - VMGuestPatchClassificationWindows.SECURITY)) - .withMaxPatchPublishDate(OffsetDateTime.parse("2021-08-19T02:36:43.0539904+00:00"))), + .withWindowsParameters(new WindowsParameters() + .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.CRITICAL, + VMGuestPatchClassificationWindows.SECURITY)) + .withMaxPatchPublishDate(OffsetDateTime.parse("2021-08-19T02:36:43.0539904+00:00"))), com.azure.core.util.Context.NONE); } } @@ -803,18 +496,20 @@ public final class MachinesInstallPatchesSamples { ### Machines_List ```java -/** Samples for Machines List. */ +/** + * Samples for Machines List. + */ public final class MachinesListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_ListBySubscription.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_ListBySubscription.json */ /** * Sample code: List Machines by resource group. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void listMachinesByResourceGroup( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + listMachinesByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.machines().list(com.azure.core.util.Context.NONE); } } @@ -823,18 +518,20 @@ public final class MachinesListSamples { ### Machines_ListByResourceGroup ```java -/** Samples for Machines ListByResourceGroup. */ +/** + * Samples for Machines ListByResourceGroup. + */ public final class MachinesListByResourceGroupSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_ListByResourceGroup.json */ /** * Sample code: List Machines by resource group. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void listMachinesByResourceGroup( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + listMachinesByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.machines().listByResourceGroup("myResourceGroup", null, com.azure.core.util.Context.NONE); } } @@ -843,14 +540,16 @@ public final class MachinesListByResourceGroupSamples { ### NetworkProfile_Get ```java -/** Samples for NetworkProfile Get. */ +/** + * Samples for NetworkProfile Get. + */ public final class NetworkProfileGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/NetworkProfile_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/NetworkProfile_Get.json */ /** * Sample code: GET Network Profile. - * + * * @param manager Entry point to HybridComputeManager. */ public static void gETNetworkProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { @@ -862,18 +561,20 @@ public final class NetworkProfileGetSamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/Operations_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/Operations_List.json */ /** * Sample code: List Hybrid Compute Provider Operations. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void listHybridComputeProviderOperations( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + listHybridComputeProviderOperations(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } @@ -885,28 +586,26 @@ public final class OperationsListSamples { import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties; import com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnectionStateProperty; -/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +/** + * Samples for PrivateEndpointConnections CreateOrUpdate. + */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json */ /** * Sample code: Approve or reject a private endpoint connection with a given name. - * + * * @param manager Entry point to HybridComputeManager. */ public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateEndpointConnections() + manager.privateEndpointConnections() .define("private-endpoint-connection-name") .withExistingPrivateLinkScope("myResourceGroup", "myPrivateLinkScope") - .withProperties( - new PrivateEndpointConnectionProperties() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("Approved") - .withDescription("Approved by johndoe@contoso.com"))) + .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionStateProperty().withStatus("Approved") + .withDescription("Approved by johndoe@contoso.com"))) .create(); } } @@ -915,24 +614,22 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { ### PrivateEndpointConnections_Delete ```java -/** Samples for PrivateEndpointConnections Delete. */ +/** + * Samples for PrivateEndpointConnections Delete. + */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. - * + * * @param manager Entry point to HybridComputeManager. */ public static void deletesAPrivateEndpointConnectionWithAGivenName( com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateEndpointConnections() - .delete( - "myResourceGroup", - "myPrivateLinkScope", - "private-endpoint-connection-name", + manager.privateEndpointConnections() + .delete("myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); } } @@ -941,24 +638,22 @@ public final class PrivateEndpointConnectionsDeleteSamples { ### PrivateEndpointConnections_Get ```java -/** Samples for PrivateEndpointConnections Get. */ +/** + * Samples for PrivateEndpointConnections Get. + */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void getsPrivateEndpointConnection( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateEndpointConnections() - .getWithResponse( - "myResourceGroup", - "myPrivateLinkScope", - "private-endpoint-connection-name", + public static void + getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateEndpointConnections() + .getWithResponse("myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); } } @@ -967,20 +662,21 @@ public final class PrivateEndpointConnectionsGetSamples { ### PrivateEndpointConnections_ListByPrivateLinkScope ```java -/** Samples for PrivateEndpointConnections ListByPrivateLinkScope. */ +/** + * Samples for PrivateEndpointConnections ListByPrivateLinkScope. + */ public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json */ /** * Sample code: Gets list of private endpoint connections on a private link scope. - * + * * @param manager Entry point to HybridComputeManager. */ public static void getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope( com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateEndpointConnections() + manager.privateEndpointConnections() .listByPrivateLinkScope("myResourceGroup", "myPrivateLinkScope", com.azure.core.util.Context.NONE); } } @@ -989,22 +685,23 @@ public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { ### PrivateLinkResources_Get ```java -/** Samples for PrivateLinkResources Get. */ +/** + * Samples for PrivateLinkResources Get. + */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void getsPrivateEndpointConnection( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkResources() - .getWithResponse( - "myResourceGroup", "myPrivateLinkScope", "hybridcompute", com.azure.core.util.Context.NONE); + public static void + getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkResources() + .getWithResponse("myResourceGroup", "myPrivateLinkScope", "hybridcompute", + com.azure.core.util.Context.NONE); } } ``` @@ -1012,20 +709,21 @@ public final class PrivateLinkResourcesGetSamples { ### PrivateLinkResources_ListByPrivateLinkScope ```java -/** Samples for PrivateLinkResources ListByPrivateLinkScope. */ +/** + * Samples for PrivateLinkResources ListByPrivateLinkScope. + */ public final class PrivateLinkResourcesListByPrivateLinkScopeSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void getsPrivateEndpointConnection( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkResources() + public static void + getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkResources() .listByPrivateLinkScope("myResourceGroup", "myPrivateLinkScope", com.azure.core.util.Context.NONE); } } @@ -1037,19 +735,20 @@ public final class PrivateLinkResourcesListByPrivateLinkScopeSamples { import java.util.HashMap; import java.util.Map; -/** Samples for PrivateLinkScopes CreateOrUpdate. */ +/** + * Samples for PrivateLinkScopes CreateOrUpdate. + */ public final class PrivateLinkScopesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json */ /** * Sample code: PrivateLinkScopeCreate. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeCreate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() + manager.privateLinkScopes() .define("my-privatelinkscope") .withRegion("westus") .withExistingResourceGroup("my-resource-group") @@ -1057,16 +756,15 @@ public final class PrivateLinkScopesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json */ /** * Sample code: PrivateLinkScopeUpdate. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeUpdate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() + manager.privateLinkScopes() .define("my-privatelinkscope") .withRegion("westus") .withExistingResourceGroup("my-resource-group") @@ -1091,19 +789,20 @@ public final class PrivateLinkScopesCreateOrUpdateSamples { ### PrivateLinkScopes_Delete ```java -/** Samples for PrivateLinkScopes Delete. */ +/** + * Samples for PrivateLinkScopes Delete. + */ public final class PrivateLinkScopesDeleteSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json */ /** * Sample code: PrivateLinkScopesDelete. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopesDelete(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() + manager.privateLinkScopes() .delete("my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE); } } @@ -1112,21 +811,22 @@ public final class PrivateLinkScopesDeleteSamples { ### PrivateLinkScopes_GetByResourceGroup ```java -/** Samples for PrivateLinkScopes GetByResourceGroup. */ +/** + * Samples for PrivateLinkScopes GetByResourceGroup. + */ public final class PrivateLinkScopesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json */ /** * Sample code: PrivateLinkScopeGet. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() - .getByResourceGroupWithResponse( - "my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE); + manager.privateLinkScopes() + .getByResourceGroupWithResponse("my-resource-group", "my-privatelinkscope", + com.azure.core.util.Context.NONE); } } ``` @@ -1134,21 +834,22 @@ public final class PrivateLinkScopesGetByResourceGroupSamples { ### PrivateLinkScopes_GetValidationDetails ```java -/** Samples for PrivateLinkScopes GetValidationDetails. */ +/** + * Samples for PrivateLinkScopes GetValidationDetails. + */ public final class PrivateLinkScopesGetValidationDetailsSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json */ /** * Sample code: PrivateLinkScopeGet. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() - .getValidationDetailsWithResponse( - "wus2", "f5dc51d3-92ed-4d7e-947a-775ea79b4919", com.azure.core.util.Context.NONE); + manager.privateLinkScopes() + .getValidationDetailsWithResponse("wus2", "f5dc51d3-92ed-4d7e-947a-775ea79b4919", + com.azure.core.util.Context.NONE); } } ``` @@ -1156,21 +857,22 @@ public final class PrivateLinkScopesGetValidationDetailsSamples { ### PrivateLinkScopes_GetValidationDetailsForMachine ```java -/** Samples for PrivateLinkScopes GetValidationDetailsForMachine. */ +/** + * Samples for PrivateLinkScopes GetValidationDetailsForMachine. + */ public final class PrivateLinkScopesGetValidationDetailsForMachineSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json */ /** * Sample code: PrivateLinkScopeGet. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() - .getValidationDetailsForMachineWithResponse( - "my-resource-group", "machineName", com.azure.core.util.Context.NONE); + manager.privateLinkScopes() + .getValidationDetailsForMachineWithResponse("my-resource-group", "machineName", + com.azure.core.util.Context.NONE); } } ``` @@ -1178,14 +880,16 @@ public final class PrivateLinkScopesGetValidationDetailsForMachineSamples { ### PrivateLinkScopes_List ```java -/** Samples for PrivateLinkScopes List. */ +/** + * Samples for PrivateLinkScopes List. + */ public final class PrivateLinkScopesListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_List.json */ /** * Sample code: PrivateLinkScopesList.json. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopesListJson(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { @@ -1197,18 +901,20 @@ public final class PrivateLinkScopesListSamples { ### PrivateLinkScopes_ListByResourceGroup ```java -/** Samples for PrivateLinkScopes ListByResourceGroup. */ +/** + * Samples for PrivateLinkScopes ListByResourceGroup. + */ public final class PrivateLinkScopesListByResourceGroupSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json */ /** * Sample code: PrivateLinkScopeListByResourceGroup. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void privateLinkScopeListByResourceGroup( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + privateLinkScopeListByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.privateLinkScopes().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } @@ -1221,24 +927,24 @@ import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkSc import java.util.HashMap; import java.util.Map; -/** Samples for PrivateLinkScopes UpdateTags. */ +/** + * Samples for PrivateLinkScopes UpdateTags. + */ public final class PrivateLinkScopesUpdateTagsSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json */ /** * Sample code: PrivateLinkScopeUpdateTagsOnly. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void privateLinkScopeUpdateTagsOnly( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - HybridComputePrivateLinkScope resource = - manager - .privateLinkScopes() - .getByResourceGroupWithResponse( - "my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE) - .getValue(); + public static void + privateLinkScopeUpdateTagsOnly(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + HybridComputePrivateLinkScope resource = manager.privateLinkScopes() + .getByResourceGroupWithResponse("my-resource-group", "my-privatelinkscope", + com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("Tag1", "Value1", "Tag2", "Value2")).apply(); } @@ -1264,29 +970,24 @@ import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpgrade; import java.util.HashMap; import java.util.Map; -/** Samples for ResourceProvider UpgradeExtensions. */ +/** + * Samples for ResourceProvider UpgradeExtensions. + */ public final class ResourceProviderUpgradeExtensionsSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extensions_Upgrade.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. - * + * * @param manager Entry point to HybridComputeManager. */ public static void upgradeMachineExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .resourceProviders() - .upgradeExtensions( - "myResourceGroup", - "myMachine", - new MachineExtensionUpgrade() - .withExtensionTargets( - mapOf( - "Microsoft.Azure.Monitoring", - new ExtensionTargetProperties().withTargetVersion("2.0"), - "Microsoft.Compute.CustomScriptExtension", - new ExtensionTargetProperties().withTargetVersion("1.10"))), + manager.resourceProviders() + .upgradeExtensions("myResourceGroup", "myMachine", + new MachineExtensionUpgrade().withExtensionTargets(mapOf("Microsoft.Azure.Monitoring", + new ExtensionTargetProperties().withTargetVersion("2.0"), "Microsoft.Compute.CustomScriptExtension", + new ExtensionTargetProperties().withTargetVersion("1.10"))), 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 2a144f362b74..d672d4123005 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-preview-2023-06. + 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-2023-10. https://github.com/Azure/azure-sdk-for-java @@ -82,14 +82,18 @@ 5.9.3 test + + org.slf4j + slf4j-simple + 1.7.36 + test + org.mockito mockito-core 4.11.0 test - - net.bytebuddy byte-buddy @@ -102,11 +106,5 @@ 1.14.12 test - - org.slf4j - slf4j-simple - 1.7.36 - test - 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 ee25016ba34e..926256f97aaa 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,8 +11,8 @@ 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.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -24,13 +24,10 @@ 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.AgentVersionsImpl; import com.azure.resourcemanager.hybridcompute.implementation.ExtensionMetadatasImpl; import com.azure.resourcemanager.hybridcompute.implementation.HybridComputeManagementClientBuilder; -import com.azure.resourcemanager.hybridcompute.implementation.HybridIdentityMetadatasImpl; -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.OperationsImpl; @@ -38,12 +35,9 @@ 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.models.AgentVersions; import com.azure.resourcemanager.hybridcompute.models.ExtensionMetadatas; -import com.azure.resourcemanager.hybridcompute.models.HybridIdentityMetadatas; -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.Operations; @@ -58,14 +52,13 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to HybridComputeManager. The Hybrid Compute Management Client. */ +/** + * Entry point to HybridComputeManager. + * The Hybrid Compute Management Client. + */ public final class HybridComputeManager { - private Licenses licenses; - private Machines machines; - private LicenseProfiles licenseProfiles; - private MachineExtensions machineExtensions; private ResourceProviders resourceProviders; @@ -76,9 +69,7 @@ public final class HybridComputeManager { private NetworkProfiles networkProfiles; - private HybridIdentityMetadatas hybridIdentityMetadatas; - - private AgentVersions agentVersions; + private MachineRunCommands machineRunCommands; private PrivateLinkScopes privateLinkScopes; @@ -91,18 +82,16 @@ public final class HybridComputeManager { private HybridComputeManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new HybridComputeManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new HybridComputeManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); } /** * Creates an instance of HybridCompute service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the HybridCompute service API instance. @@ -115,7 +104,7 @@ public static HybridComputeManager authenticate(TokenCredential credential, Azur /** * Creates an instance of HybridCompute service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the HybridCompute service API instance. @@ -128,14 +117,16 @@ public static HybridComputeManager authenticate(HttpPipeline httpPipeline, Azure /** * Gets a Configurable instance that can be used to create HybridComputeManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new HybridComputeManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -207,8 +198,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -225,8 +216,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -246,15 +237,13 @@ public HybridComputeManager authenticate(TokenCredential credential, AzureProfil Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") + userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.hybridcompute") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.4"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") + userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ") .append(Configuration.getGlobalConfiguration().get("os.name")) @@ -279,50 +268,28 @@ public HybridComputeManager authenticate(TokenCredential credential, AzureProfil policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); return new HybridComputeManager(httpPipeline, profile, defaultPollInterval); } } - /** - * Gets the resource collection API of Licenses. It manages License. - * - * @return Resource collection API of Licenses. - */ - public Licenses licenses() { - if (this.licenses == null) { - this.licenses = new LicensesImpl(clientObject.getLicenses(), this); - } - return licenses; - } - /** * Gets the resource collection API of Machines. - * + * * @return Resource collection API of Machines. */ public Machines machines() { @@ -332,21 +299,9 @@ public Machines machines() { return machines; } - /** - * Gets the resource collection API of LicenseProfiles. It manages LicenseProfile. - * - * @return Resource collection API of LicenseProfiles. - */ - public LicenseProfiles licenseProfiles() { - if (this.licenseProfiles == null) { - this.licenseProfiles = new LicenseProfilesImpl(clientObject.getLicenseProfiles(), this); - } - return licenseProfiles; - } - /** * Gets the resource collection API of MachineExtensions. It manages MachineExtension. - * + * * @return Resource collection API of MachineExtensions. */ public MachineExtensions machineExtensions() { @@ -358,7 +313,7 @@ public MachineExtensions machineExtensions() { /** * Gets the resource collection API of ResourceProviders. - * + * * @return Resource collection API of ResourceProviders. */ public ResourceProviders resourceProviders() { @@ -370,7 +325,7 @@ public ResourceProviders resourceProviders() { /** * Gets the resource collection API of ExtensionMetadatas. - * + * * @return Resource collection API of ExtensionMetadatas. */ public ExtensionMetadatas extensionMetadatas() { @@ -382,7 +337,7 @@ public ExtensionMetadatas extensionMetadatas() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -394,7 +349,7 @@ public Operations operations() { /** * Gets the resource collection API of NetworkProfiles. - * + * * @return Resource collection API of NetworkProfiles. */ public NetworkProfiles networkProfiles() { @@ -405,33 +360,20 @@ public NetworkProfiles networkProfiles() { } /** - * Gets the resource collection API of HybridIdentityMetadatas. - * - * @return Resource collection API of HybridIdentityMetadatas. - */ - public HybridIdentityMetadatas hybridIdentityMetadatas() { - if (this.hybridIdentityMetadatas == null) { - this.hybridIdentityMetadatas = - new HybridIdentityMetadatasImpl(clientObject.getHybridIdentityMetadatas(), this); - } - return hybridIdentityMetadatas; - } - - /** - * Gets the resource collection API of AgentVersions. - * - * @return Resource collection API of AgentVersions. + * Gets the resource collection API of MachineRunCommands. It manages MachineRunCommand. + * + * @return Resource collection API of MachineRunCommands. */ - public AgentVersions agentVersions() { - if (this.agentVersions == null) { - this.agentVersions = new AgentVersionsImpl(clientObject.getAgentVersions(), this); + public MachineRunCommands machineRunCommands() { + if (this.machineRunCommands == null) { + this.machineRunCommands = new MachineRunCommandsImpl(clientObject.getMachineRunCommands(), this); } - return agentVersions; + return machineRunCommands; } /** * Gets the resource collection API of PrivateLinkScopes. It manages HybridComputePrivateLinkScope. - * + * * @return Resource collection API of PrivateLinkScopes. */ public PrivateLinkScopes privateLinkScopes() { @@ -443,7 +385,7 @@ public PrivateLinkScopes privateLinkScopes() { /** * Gets the resource collection API of PrivateLinkResources. - * + * * @return Resource collection API of PrivateLinkResources. */ public PrivateLinkResources privateLinkResources() { @@ -455,13 +397,13 @@ public PrivateLinkResources privateLinkResources() { /** * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. - * + * * @return Resource collection API of PrivateEndpointConnections. */ public PrivateEndpointConnections privateEndpointConnections() { if (this.privateEndpointConnections == null) { - this.privateEndpointConnections = - new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); } return privateEndpointConnections; } @@ -469,7 +411,7 @@ public PrivateEndpointConnections privateEndpointConnections() { /** * Gets wrapped service client HybridComputeManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. - * + * * @return Wrapped service client HybridComputeManagementClient. */ public HybridComputeManagementClient serviceClient() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/AgentVersionsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/AgentVersionsClient.java deleted file mode 100644 index 3b652cc831d9..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/AgentVersionsClient.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.AgentVersionInner; -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionsListInner; - -/** An instance of this class provides access to all the operations defined in AgentVersionsClient. */ -public interface AgentVersionsClient { - /** - * Gets all Agent Versions along with the download link currently present. - * - * @param osType Defines the os type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Agent Versions along with the download link currently present along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String osType, Context context); - - /** - * Gets all Agent Versions along with the download link currently present. - * - * @param osType Defines the os type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Agent Versions along with the download link currently present. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AgentVersionsListInner list(String osType); - - /** - * Gets an Agent Version along with the download link currently present. - * - * @param osType Defines the os type. - * @param version Defines the agent version. To get latest, use latest or else a specific agent version. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Agent Version along with the download link currently present along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String osType, String version, Context context); - - /** - * Gets an Agent Version along with the download link currently present. - * - * @param osType Defines the os type. - * @param version Defines the agent version. To get latest, use latest or else a specific agent version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Agent Version along with the download link currently present. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AgentVersionInner get(String osType, String version); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadatasClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadatasClient.java index 0c4503ecb66e..8f195cf6e387 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadatasClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ExtensionMetadatasClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueInner; -/** An instance of this class provides access to all the operations defined in ExtensionMetadatasClient. */ +/** + * An instance of this class provides access to all the operations defined in ExtensionMetadatasClient. + */ public interface ExtensionMetadatasClient { /** * Gets an Extension Metadata based on location, publisher, extensionType and version. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -24,16 +26,16 @@ public interface ExtensionMetadatasClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Extension Metadata based on location, publisher, extensionType and version along with {@link - * Response}. + * @return an Extension Metadata based on location, publisher, extensionType and version along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String location, String publisher, String extensionType, String version, Context context); + Response getWithResponse(String location, String publisher, String extensionType, + String version, Context context); /** * Gets an Extension Metadata based on location, publisher, extensionType and version. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -48,22 +50,22 @@ Response getWithResponse( /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType as paginated response with {@link - * PagedIterable}. + * @return all Extension versions based on location, publisher, extensionType as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location, String publisher, String extensionType); /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -71,8 +73,8 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType as paginated response with {@link - * PagedIterable}. + * @return all Extension versions based on location, publisher, extensionType as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location, String publisher, String extensionType, 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 97d2a4b7bdec..e94022bc5e15 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 @@ -7,130 +7,111 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for HybridComputeManagementClient class. */ +/** + * The interface for HybridComputeManagementClient class. + */ public interface HybridComputeManagementClient { /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); - /** - * Gets the LicensesClient object to access its operations. - * - * @return the LicensesClient object. - */ - LicensesClient getLicenses(); - /** * Gets the MachinesClient object to access its operations. - * + * * @return the MachinesClient object. */ MachinesClient getMachines(); - /** - * Gets the LicenseProfilesClient object to access its operations. - * - * @return the LicenseProfilesClient object. - */ - LicenseProfilesClient getLicenseProfiles(); - /** * Gets the MachineExtensionsClient object to access its operations. - * + * * @return the MachineExtensionsClient object. */ MachineExtensionsClient getMachineExtensions(); /** * Gets the ResourceProvidersClient object to access its operations. - * + * * @return the ResourceProvidersClient object. */ ResourceProvidersClient getResourceProviders(); /** * Gets the ExtensionMetadatasClient object to access its operations. - * + * * @return the ExtensionMetadatasClient object. */ ExtensionMetadatasClient getExtensionMetadatas(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the NetworkProfilesClient object to access its operations. - * + * * @return the NetworkProfilesClient object. */ NetworkProfilesClient getNetworkProfiles(); /** - * Gets the HybridIdentityMetadatasClient object to access its operations. - * - * @return the HybridIdentityMetadatasClient object. - */ - HybridIdentityMetadatasClient getHybridIdentityMetadatas(); - - /** - * Gets the AgentVersionsClient object to access its operations. - * - * @return the AgentVersionsClient object. + * Gets the MachineRunCommandsClient object to access its operations. + * + * @return the MachineRunCommandsClient object. */ - AgentVersionsClient getAgentVersions(); + MachineRunCommandsClient getMachineRunCommands(); /** * Gets the PrivateLinkScopesClient object to access its operations. - * + * * @return the PrivateLinkScopesClient object. */ PrivateLinkScopesClient getPrivateLinkScopes(); /** * Gets the PrivateLinkResourcesClient object to access its operations. - * + * * @return the PrivateLinkResourcesClient object. */ PrivateLinkResourcesClient getPrivateLinkResources(); /** * Gets the PrivateEndpointConnectionsClient object to access its operations. - * + * * @return the PrivateEndpointConnectionsClient object. */ PrivateEndpointConnectionsClient getPrivateEndpointConnections(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/HybridIdentityMetadatasClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/HybridIdentityMetadatasClient.java deleted file mode 100644 index f973654b8502..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/HybridIdentityMetadatasClient.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.util.Context; -import com.azure.resourcemanager.hybridcompute.fluent.models.HybridIdentityMetadataInner; - -/** An instance of this class provides access to all the operations defined in HybridIdentityMetadatasClient. */ -public interface HybridIdentityMetadatasClient { - /** - * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param metadataName Name of the HybridIdentityMetadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String machineName, String metadataName, Context context); - - /** - * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param metadataName Name of the HybridIdentityMetadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - HybridIdentityMetadataInner get(String resourceGroupName, String machineName, String metadataName); - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given 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 list of HybridIdentityMetadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByMachines(String resourceGroupName, String machineName); - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of HybridIdentityMetadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByMachines( - String resourceGroupName, String machineName, Context context); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicensesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicensesClient.java deleted file mode 100644 index 7a901c6cb157..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicensesClient.java +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseUpdate; - -/** An instance of this class provides access to all the operations defined in LicensesClient. */ -public interface LicensesClient { - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters); - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters, Context context); - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner validateLicense(LicenseInner parameters); - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner validateLicense(LicenseInner parameters, Context context); - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseInner> beginCreateOrUpdate( - String resourceGroupName, String licenseName, LicenseInner parameters); - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license 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 a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseInner> beginCreateOrUpdate( - String resourceGroupName, String licenseName, LicenseInner parameters, Context context); - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner createOrUpdate(String resourceGroupName, String licenseName, LicenseInner parameters); - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner createOrUpdate(String resourceGroupName, String licenseName, LicenseInner parameters, Context context); - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseInner> beginUpdate( - String resourceGroupName, String licenseName, LicenseUpdate parameters); - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license 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 a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseInner> beginUpdate( - String resourceGroupName, String licenseName, LicenseUpdate parameters, Context context); - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner update(String resourceGroupName, String licenseName, LicenseUpdate parameters); - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner update(String resourceGroupName, String licenseName, LicenseUpdate parameters, Context context); - - /** - * Retrieves information about the view of a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String licenseName, Context context); - - /** - * Retrieves information about the view of a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LicenseInner getByResourceGroup(String resourceGroupName, String licenseName); - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String licenseName); - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String licenseName, Context context); - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String licenseName); - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String licenseName, Context context); - - /** - * The operation to get all licenses 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 licenses 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 licenses 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 licenses 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/MachineExtensionsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineExtensionsClient.java index 14455916ca88..a2cfd8312a9c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineExtensionsClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineExtensionsClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpdate; -/** An instance of this class provides access to all the operations defined in MachineExtensionsClient. */ +/** + * An instance of this class provides access to all the operations defined in MachineExtensionsClient. + */ public interface MachineExtensionsClient { /** * 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. * @param extensionName The name of the machine extension. @@ -29,12 +31,12 @@ public interface MachineExtensionsClient { * @return the {@link SyncPoller} for polling of describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MachineExtensionInner> beginCreateOrUpdate( - String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters); + SyncPoller, MachineExtensionInner> beginCreateOrUpdate(String resourceGroupName, + String machineName, String extensionName, MachineExtensionInner extensionParameters); /** * 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. * @param extensionName The name of the machine extension. @@ -46,16 +48,12 @@ SyncPoller, MachineExtensionInner> beginCreate * @return the {@link SyncPoller} for polling of describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MachineExtensionInner> beginCreateOrUpdate( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionInner extensionParameters, - Context context); + SyncPoller, MachineExtensionInner> beginCreateOrUpdate(String resourceGroupName, + String machineName, String extensionName, MachineExtensionInner extensionParameters, Context context); /** * The operation to create or update the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -66,12 +64,12 @@ SyncPoller, MachineExtensionInner> beginCreate * @return describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - MachineExtensionInner createOrUpdate( - String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters); + MachineExtensionInner createOrUpdate(String resourceGroupName, String machineName, String extensionName, + MachineExtensionInner extensionParameters); /** * 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. * @param extensionName The name of the machine extension. @@ -83,16 +81,12 @@ MachineExtensionInner createOrUpdate( * @return describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - MachineExtensionInner createOrUpdate( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionInner extensionParameters, - Context context); + MachineExtensionInner createOrUpdate(String resourceGroupName, String machineName, String extensionName, + MachineExtensionInner extensionParameters, Context context); /** * The operation to create or update the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -103,12 +97,12 @@ MachineExtensionInner createOrUpdate( * @return the {@link SyncPoller} for polling of describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MachineExtensionInner> beginUpdate( - String resourceGroupName, String machineName, String extensionName, MachineExtensionUpdate extensionParameters); + SyncPoller, MachineExtensionInner> beginUpdate(String resourceGroupName, + String machineName, String extensionName, MachineExtensionUpdate extensionParameters); /** * 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. * @param extensionName The name of the machine extension. @@ -120,16 +114,12 @@ SyncPoller, MachineExtensionInner> beginUpdate * @return the {@link SyncPoller} for polling of describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MachineExtensionInner> beginUpdate( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionUpdate extensionParameters, - Context context); + SyncPoller, MachineExtensionInner> beginUpdate(String resourceGroupName, + String machineName, String extensionName, MachineExtensionUpdate extensionParameters, Context context); /** * The operation to create or update the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -140,12 +130,12 @@ SyncPoller, MachineExtensionInner> beginUpdate * @return describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - MachineExtensionInner update( - String resourceGroupName, String machineName, String extensionName, MachineExtensionUpdate extensionParameters); + MachineExtensionInner update(String resourceGroupName, String machineName, String extensionName, + MachineExtensionUpdate extensionParameters); /** * 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. * @param extensionName The name of the machine extension. @@ -157,16 +147,12 @@ MachineExtensionInner update( * @return describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - MachineExtensionInner update( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionUpdate extensionParameters, - Context context); + MachineExtensionInner update(String resourceGroupName, String machineName, String extensionName, + MachineExtensionUpdate extensionParameters, Context context); /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -180,7 +166,7 @@ MachineExtensionInner update( /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -191,12 +177,12 @@ MachineExtensionInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String machineName, String extensionName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, String extensionName, + Context context); /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -209,7 +195,7 @@ SyncPoller, Void> beginDelete( /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -223,7 +209,7 @@ SyncPoller, Void> beginDelete( /** * The operation to get the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. @@ -234,12 +220,12 @@ SyncPoller, Void> beginDelete( * @return describes a Machine Extension along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String machineName, String extensionName, Context context); + Response getWithResponse(String resourceGroupName, String machineName, String extensionName, + Context context); /** * The operation to get the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. @@ -253,7 +239,7 @@ Response getWithResponse( /** * The operation to get all extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -266,7 +252,7 @@ Response getWithResponse( /** * The operation to get all extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. @@ -277,6 +263,6 @@ Response getWithResponse( * @return describes the Machine Extensions List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String machineName, String expand, Context context); + 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/LicenseProfilesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java similarity index 52% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicenseProfilesClient.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java index ba1ba3de2a91..67f1c56883fd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/LicenseProfilesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachineRunCommandsClient.java @@ -11,238 +11,191 @@ 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.LicenseProfileInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileUpdate; +import com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner; -/** An instance of this class provides access to all the operations defined in LicenseProfilesClient. */ -public interface LicenseProfilesClient { +/** + * An instance of this class provides access to all the operations defined in MachineRunCommandsClient. + */ +public interface MachineRunCommandsClient { /** - * The operation to create or update a license profile. - * + * 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 parameters Parameters supplied to the Create license profile operation. + * @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 license profile in a hybrid machine. + * @return the {@link SyncPoller} for polling of describes a Run Command. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseProfileInner> beginCreateOrUpdate( - String resourceGroupName, String machineName, LicenseProfileInner parameters); + SyncPoller, MachineRunCommandInner> beginCreateOrUpdate(String resourceGroupName, + String machineName, String runCommandName, MachineRunCommandInner runCommandProperties); /** - * The operation to create or update a license profile. - * + * 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 parameters Parameters supplied to the Create license profile operation. + * @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 license profile in a hybrid machine. + * @return the {@link SyncPoller} for polling of describes a Run Command. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseProfileInner> beginCreateOrUpdate( - String resourceGroupName, String machineName, LicenseProfileInner parameters, Context context); + SyncPoller, MachineRunCommandInner> beginCreateOrUpdate(String resourceGroupName, + String machineName, String runCommandName, MachineRunCommandInner runCommandProperties, Context context); /** - * The operation to create or update a license profile. - * + * 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 parameters Parameters supplied to the Create license profile operation. + * @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 license profile in a hybrid machine. + * @return describes a Run Command. */ @ServiceMethod(returns = ReturnType.SINGLE) - LicenseProfileInner createOrUpdate(String resourceGroupName, String machineName, LicenseProfileInner parameters); + MachineRunCommandInner createOrUpdate(String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties); /** - * The operation to create or update a license profile. - * + * 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 parameters Parameters supplied to the Create license profile operation. + * @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 license profile in a hybrid machine. + * @return describes a Run Command. */ @ServiceMethod(returns = ReturnType.SINGLE) - LicenseProfileInner createOrUpdate( - String resourceGroupName, String machineName, LicenseProfileInner parameters, Context context); + MachineRunCommandInner createOrUpdate(String resourceGroupName, String machineName, String runCommandName, + MachineRunCommandInner runCommandProperties, Context context); /** - * The operation to update a license profile. - * + * 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 parameters Parameters supplied to the Update license profile operation. + * @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 describes a license profile in a hybrid machine. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseProfileInner> beginUpdate( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters); + SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, String runCommandName); /** - * The operation to update a license profile. - * + * 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 parameters Parameters supplied to the Update license profile operation. + * @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 describes a license profile in a hybrid machine. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LicenseProfileInner> beginUpdate( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, String runCommandName, + Context context); /** - * The operation to update a license profile. - * + * 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 parameters Parameters supplied to the Update license profile operation. + * @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 license profile in a hybrid machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - LicenseProfileInner update(String resourceGroupName, String machineName, LicenseProfileUpdate parameters); + void delete(String resourceGroupName, String machineName, String runCommandName); /** - * The operation to update a license profile. - * + * 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 parameters Parameters supplied to the Update license profile operation. + * @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 license profile in a hybrid machine. */ @ServiceMethod(returns = ReturnType.SINGLE) - LicenseProfileInner update( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters, Context context); + void delete(String resourceGroupName, String machineName, String runCommandName, Context context); /** - * Retrieves information about the view of a license profile. - * + * 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 license profile in a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String machineName, Context context); - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine. + * @return describes a Run Command along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - LicenseProfileInner get(String resourceGroupName, String machineName); - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String machineName); + Response getWithResponse(String resourceGroupName, String machineName, + String runCommandName, Context context); /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, Context context); - - /** - * The operation to delete a license profile. - * + * 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) - void delete(String resourceGroupName, String machineName); + MachineRunCommandInner get(String resourceGroupName, String machineName, String runCommandName); /** - * The operation to delete a license profile. - * + * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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, Context context); - - /** - * The operation to get all license profiles of a non-Azure machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List hybrid machine license profile operation response as paginated response with {@link - * PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String machineName); + PagedIterable list(String resourceGroupName, String machineName); /** - * The operation to get all license profiles of a non-Azure machine. - * + * 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 machine. + * @param machineName The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List hybrid machine license profile operation response as paginated response with {@link - * PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String machineName, Context context); + 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/MachinesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachinesClient.java index 08574840b036..d87de96c5595 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachinesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/MachinesClient.java @@ -14,14 +14,15 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.MachineAssessPatchesResultInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInstallPatchesResultInner; -import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters; -/** An instance of this class provides access to all the operations defined in MachinesClient. */ +/** + * An instance of this class provides access to all the operations defined in MachinesClient. + */ public interface MachinesClient { /** * The operation to delete a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param context The context to associate with this operation. @@ -35,7 +36,7 @@ public interface MachinesClient { /** * The operation to delete a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -47,7 +48,7 @@ public interface MachinesClient { /** * Retrieves information about the model view or the instance view of a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param expand The expand expression to apply on the operation. @@ -58,12 +59,12 @@ public interface MachinesClient { * @return describes a hybrid machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String machineName, InstanceViewTypes expand, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, String expand, + Context context); /** * Retrieves information about the model view or the instance view of a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -76,7 +77,7 @@ Response getByResourceGroupWithResponse( /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -85,12 +86,12 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of describes the properties of an AssessPatches result. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MachineAssessPatchesResultInner> beginAssessPatches( - String resourceGroupName, String name); + SyncPoller, MachineAssessPatchesResultInner> + beginAssessPatches(String resourceGroupName, String name); /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. @@ -100,12 +101,12 @@ SyncPoller, MachineAssessPatchesResu * @return the {@link SyncPoller} for polling of describes the properties of an AssessPatches result. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MachineAssessPatchesResultInner> beginAssessPatches( - String resourceGroupName, String name, Context context); + SyncPoller, MachineAssessPatchesResultInner> + beginAssessPatches(String resourceGroupName, String name, Context context); /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -118,7 +119,7 @@ SyncPoller, MachineAssessPatchesResu /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. @@ -132,7 +133,7 @@ SyncPoller, MachineAssessPatchesResu /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -142,12 +143,12 @@ SyncPoller, MachineAssessPatchesResu * @return the {@link SyncPoller} for polling of the result summary of an installation operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, MachineInstallPatchesResultInner> beginInstallPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput); + SyncPoller, MachineInstallPatchesResultInner> + beginInstallPatches(String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput); /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -163,7 +164,7 @@ SyncPoller, MachineInstallPatchesRe /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -173,12 +174,12 @@ SyncPoller, MachineInstallPatchesRe * @return the result summary of an installation operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - MachineInstallPatchesResultInner installPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput); + MachineInstallPatchesResultInner installPatches(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput); /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -189,13 +190,13 @@ MachineInstallPatchesResultInner installPatches( * @return the result summary of an installation operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - MachineInstallPatchesResultInner installPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput, Context context); + MachineInstallPatchesResultInner installPatches(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput, Context context); /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -208,7 +209,7 @@ MachineInstallPatchesResultInner installPatches( /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param expand Expands referenced resources. * @param context The context to associate with this operation. @@ -223,7 +224,7 @@ MachineInstallPatchesResultInner installPatches( /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. @@ -234,7 +235,7 @@ MachineInstallPatchesResultInner installPatches( /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkProfilesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkProfilesClient.java index 12bad427e256..648876e4d161 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkProfilesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/NetworkProfilesClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner; -/** An instance of this class provides access to all the operations defined in NetworkProfilesClient. */ +/** + * An instance of this class provides access to all the operations defined in NetworkProfilesClient. + */ public interface NetworkProfilesClient { /** * The operation to get network information of hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param context The context to associate with this operation. @@ -28,7 +30,7 @@ public interface NetworkProfilesClient { /** * The operation to get network information of hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/OperationsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/OperationsClient.java index 1e9ec54cd726..a87f074eaa4c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/OperationsClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/OperationsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.hybridcompute.fluent.models.OperationValueInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Gets a list of hybrid compute operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of hybrid compute operations as paginated response with {@link PagedIterable}. @@ -24,7 +26,7 @@ public interface OperationsClient { /** * Gets a list of hybrid compute operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateEndpointConnectionsClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateEndpointConnectionsClient.java index 2bf9cede4846..d2dc347d7aca 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateEndpointConnectionsClient.java @@ -13,11 +13,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateEndpointConnectionInner; -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public interface PrivateEndpointConnectionsClient { /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -28,12 +30,12 @@ public interface PrivateEndpointConnectionsClient { * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, Context context); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -43,12 +45,12 @@ Response getWithResponse( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( - String resourceGroupName, String scopeName, String privateEndpointConnectionName); + PrivateEndpointConnectionInner get(String resourceGroupName, String scopeName, + String privateEndpointConnectionName); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -60,14 +62,12 @@ PrivateEndpointConnectionInner get( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, + String resourceGroupName, String scopeName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -80,15 +80,12 @@ SyncPoller, PrivateEndpointConnection */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context); + String resourceGroupName, String scopeName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -99,15 +96,12 @@ SyncPoller, PrivateEndpointConnection * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters); + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters); /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -119,16 +113,12 @@ PrivateEndpointConnectionInner createOrUpdate( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context); + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -138,12 +128,12 @@ PrivateEndpointConnectionInner createOrUpdate( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String scopeName, String privateEndpointConnectionName); + SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName, + String privateEndpointConnectionName); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -154,12 +144,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, Context context); /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -172,7 +162,7 @@ SyncPoller, Void> beginDelete( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -186,31 +176,31 @@ SyncPoller, Void> beginDelete( /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a private link scope as paginated response with {@link - * PagedIterable}. + * @return all private endpoint connections on a private link scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName); /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a private link scope as paginated response with {@link - * PagedIterable}. + * @return all private endpoint connections on a private link scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByPrivateLinkScope( - String resourceGroupName, String scopeName, Context context); + PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkResourcesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkResourcesClient.java index e590c144e5db..cd8b7c055cc0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkResourcesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkResourcesClient.java @@ -11,25 +11,27 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkResourceInner; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public interface PrivateLinkResourcesClient { /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -37,15 +39,15 @@ public interface PrivateLinkResourcesClient { * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByPrivateLinkScope( - String resourceGroupName, String scopeName, Context context); + PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param groupName The name of the private link resource. @@ -53,16 +55,16 @@ PagedIterable listByPrivateLinkScope( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with {@link - * Response}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String scopeName, String groupName, Context context); + Response getWithResponse(String resourceGroupName, String scopeName, String groupName, + Context context); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param groupName The name of the private link resource. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkScopesClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkScopesClient.java index f334ae205a65..e09ba79bb901 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkScopesClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/PrivateLinkScopesClient.java @@ -15,62 +15,64 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkScopeValidationDetailsInner; import com.azure.resourcemanager.hybridcompute.models.TagsResource; -/** An instance of this class provides access to all the operations defined in PrivateLinkScopesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkScopesClient. + */ public interface PrivateLinkScopesClient { /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with {@link - * PagedIterable}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with {@link - * PagedIterable}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -83,7 +85,7 @@ public interface PrivateLinkScopesClient { /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -97,7 +99,7 @@ public interface PrivateLinkScopesClient { /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -109,7 +111,7 @@ public interface PrivateLinkScopesClient { /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -122,7 +124,7 @@ public interface PrivateLinkScopesClient { /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -132,12 +134,12 @@ public interface PrivateLinkScopesClient { * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String scopeName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String scopeName, Context context); /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -151,11 +153,11 @@ Response getByResourceGroupWithResponse( /** * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for * InstrumentationKey nor AppId in the Put operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. + * PrivateLinkScope. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -163,29 +165,29 @@ Response getByResourceGroupWithResponse( * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String scopeName, HybridComputePrivateLinkScopeInner parameters, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String scopeName, + HybridComputePrivateLinkScopeInner parameters, Context context); /** * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for * InstrumentationKey nor AppId in the Put operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. + * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Azure Arc PrivateLinkScope definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - HybridComputePrivateLinkScopeInner createOrUpdate( - String resourceGroupName, String scopeName, HybridComputePrivateLinkScopeInner parameters); + HybridComputePrivateLinkScopeInner createOrUpdate(String resourceGroupName, String scopeName, + HybridComputePrivateLinkScopeInner parameters); /** * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. @@ -196,12 +198,12 @@ HybridComputePrivateLinkScopeInner createOrUpdate( * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateTagsWithResponse( - String resourceGroupName, String scopeName, TagsResource privateLinkScopeTags, Context context); + Response updateTagsWithResponse(String resourceGroupName, String scopeName, + TagsResource privateLinkScopeTags, Context context); /** * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. @@ -211,12 +213,12 @@ Response updateTagsWithResponse( * @return an Azure Arc PrivateLinkScope definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - HybridComputePrivateLinkScopeInner updateTags( - String resourceGroupName, String scopeName, TagsResource privateLinkScopeTags); + HybridComputePrivateLinkScopeInner updateTags(String resourceGroupName, String scopeName, + TagsResource privateLinkScopeTags); /** * Returns a Azure Arc PrivateLinkScope's validation details. - * + * * @param location The location of the target resource. * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -226,12 +228,12 @@ HybridComputePrivateLinkScopeInner updateTags( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getValidationDetailsWithResponse( - String location, String privateLinkScopeId, Context context); + Response getValidationDetailsWithResponse(String location, + String privateLinkScopeId, Context context); /** * Returns a Azure Arc PrivateLinkScope's validation details. - * + * * @param location The location of the target resource. * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,7 +246,7 @@ Response getValidationDetailsWithRespons /** * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the target machine to get the private link scope validation details for. * @param context The context to associate with this operation. @@ -254,12 +256,12 @@ Response getValidationDetailsWithRespons * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getValidationDetailsForMachineWithResponse( - String resourceGroupName, String machineName, Context context); + Response + getValidationDetailsForMachineWithResponse(String resourceGroupName, String machineName, Context context); /** * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ResourceProvidersClient.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ResourceProvidersClient.java index 22c4e9a1c695..014013b15da6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ResourceProvidersClient.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/ResourceProvidersClient.java @@ -11,11 +11,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpgrade; -/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ +/** + * An instance of this class provides access to all the operations defined in ResourceProvidersClient. + */ public interface ResourceProvidersClient { /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -25,12 +27,12 @@ public interface ResourceProvidersClient { * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpgradeExtensions( - String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters); + SyncPoller, Void> beginUpgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters); /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -41,15 +43,12 @@ SyncPoller, Void> beginUpgradeExtensions( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpgradeExtensions( - String resourceGroupName, - String machineName, - MachineExtensionUpgrade extensionUpgradeParameters, - Context context); + SyncPoller, Void> beginUpgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters, Context context); /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -58,12 +57,12 @@ SyncPoller, Void> beginUpgradeExtensions( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void upgradeExtensions( - String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters); + void upgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters); /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -73,9 +72,6 @@ void upgradeExtensions( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void upgradeExtensions( - String resourceGroupName, - String machineName, - MachineExtensionUpgrade extensionUpgradeParameters, - Context context); + void upgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters, Context context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AccessRuleProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AccessRuleProperties.java new file mode 100644 index 000000000000..39c8656dc5d8 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AccessRuleProperties.java @@ -0,0 +1,60 @@ +// 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.Immutable; +import com.azure.resourcemanager.hybridcompute.models.AccessRuleDirection; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Properties of an access rule. + */ +@Immutable +public final class AccessRuleProperties { + /* + * Direction of the access rule. + */ + @JsonProperty(value = "direction", access = JsonProperty.Access.WRITE_ONLY) + private AccessRuleDirection direction; + + /* + * Address prefixes that are allowed access. + */ + @JsonProperty(value = "addressPrefixes", access = JsonProperty.Access.WRITE_ONLY) + private List addressPrefixes; + + /** + * Creates an instance of AccessRuleProperties class. + */ + public AccessRuleProperties() { + } + + /** + * Get the direction property: Direction of the access rule. + * + * @return the direction value. + */ + public AccessRuleDirection direction() { + return this.direction; + } + + /** + * Get the addressPrefixes property: Address prefixes that are allowed access. + * + * @return the addressPrefixes value. + */ + public List addressPrefixes() { + return this.addressPrefixes; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AgentVersionInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AgentVersionInner.java deleted file mode 100644 index 489dd78204ca..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AgentVersionInner.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes properties of Agent Version. */ -@Fluent -public final class AgentVersionInner { - /* - * Represents the agent version. - */ - @JsonProperty(value = "agentVersion") - private String agentVersion; - - /* - * Represents the download link of specific agent version. - */ - @JsonProperty(value = "downloadLink") - private String downloadLink; - - /* - * Defines the os type. - */ - @JsonProperty(value = "osType") - private String osType; - - /** Creates an instance of AgentVersionInner class. */ - public AgentVersionInner() { - } - - /** - * Get the agentVersion property: Represents the agent version. - * - * @return the agentVersion value. - */ - public String agentVersion() { - return this.agentVersion; - } - - /** - * Set the agentVersion property: Represents the agent version. - * - * @param agentVersion the agentVersion value to set. - * @return the AgentVersionInner object itself. - */ - public AgentVersionInner withAgentVersion(String agentVersion) { - this.agentVersion = agentVersion; - return this; - } - - /** - * Get the downloadLink property: Represents the download link of specific agent version. - * - * @return the downloadLink value. - */ - public String downloadLink() { - return this.downloadLink; - } - - /** - * Set the downloadLink property: Represents the download link of specific agent version. - * - * @param downloadLink the downloadLink value to set. - * @return the AgentVersionInner object itself. - */ - public AgentVersionInner withDownloadLink(String downloadLink) { - this.downloadLink = downloadLink; - return this; - } - - /** - * Get the osType property: Defines the os type. - * - * @return the osType value. - */ - public String osType() { - return this.osType; - } - - /** - * Set the osType property: Defines the os type. - * - * @param osType the osType value to set. - * @return the AgentVersionInner object itself. - */ - public AgentVersionInner withOsType(String osType) { - this.osType = osType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AgentVersionsListInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AgentVersionsListInner.java deleted file mode 100644 index 23a48f953f4a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/AgentVersionsListInner.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes AgentVersions List. */ -@Fluent -public final class AgentVersionsListInner { - /* - * The list of available Agent Versions. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The URI to fetch the next 10 available Agent Versions. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** Creates an instance of AgentVersionsListInner class. */ - public AgentVersionsListInner() { - } - - /** - * Get the value property: The list of available Agent Versions. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of available Agent Versions. - * - * @param value the value value to set. - * @return the AgentVersionsListInner object itself. - */ - public AgentVersionsListInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI to fetch the next 10 available Agent Versions. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI to fetch the next 10 available Agent Versions. - * - * @param nextLink the nextLink value to set. - * @return the AgentVersionsListInner object itself. - */ - public AgentVersionsListInner 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()); - } - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/EsuProfileUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/EsuProfileUpdateProperties.java index e714b1d7e787..57b9ddfa9374 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/EsuProfileUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/EsuProfileUpdateProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the Update properties of a License Profile. */ +/** + * Describes the Update properties of a ESU License Profile. + */ @Fluent public final class EsuProfileUpdateProperties { /* @@ -16,13 +18,15 @@ public final class EsuProfileUpdateProperties { @JsonProperty(value = "assignedLicense") private String assignedLicense; - /** Creates an instance of EsuProfileUpdateProperties class. */ + /** + * Creates an instance of EsuProfileUpdateProperties class. + */ public EsuProfileUpdateProperties() { } /** * Get the assignedLicense property: The resource id of the license. - * + * * @return the assignedLicense value. */ public String assignedLicense() { @@ -31,7 +35,7 @@ public String assignedLicense() { /** * Set the assignedLicense property: The resource id of the license. - * + * * @param assignedLicense the assignedLicense value to set. * @return the EsuProfileUpdateProperties object itself. */ @@ -42,7 +46,7 @@ public EsuProfileUpdateProperties withAssignedLicense(String assignedLicense) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueInner.java index 2dbed12fa942..e7aa67f2bbff 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueInner.java @@ -9,7 +9,9 @@ import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes a Extension Metadata. */ +/** + * Describes a Extension Metadata. + */ @Immutable public final class ExtensionValueInner extends ProxyResource { /* @@ -24,13 +26,15 @@ public final class ExtensionValueInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ExtensionValueInner class. */ + /** + * Creates an instance of ExtensionValueInner class. + */ public ExtensionValueInner() { } /** * Get the innerProperties property: The single extension based on search criteria. - * + * * @return the innerProperties value. */ private ExtensionValueProperties innerProperties() { @@ -39,7 +43,7 @@ private ExtensionValueProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -48,7 +52,7 @@ public SystemData systemData() { /** * Get the version property: The version of the Extension being received. - * + * * @return the version value. */ public String version() { @@ -57,7 +61,7 @@ public String version() { /** * Get the extensionType property: The type of the Extension being received. - * + * * @return the extensionType value. */ public String extensionType() { @@ -66,7 +70,7 @@ public String extensionType() { /** * Get the publisher property: The publisher of the Extension being received. - * + * * @return the publisher value. */ public String publisher() { @@ -75,7 +79,7 @@ public String publisher() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueProperties.java index e4d1cd924223..26cc37522353 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/ExtensionValueProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes Extension Metadata properties. */ +/** + * Describes Extension Metadata properties. + */ @Immutable public final class ExtensionValueProperties { /* @@ -28,13 +30,15 @@ public final class ExtensionValueProperties { @JsonProperty(value = "publisher", access = JsonProperty.Access.WRITE_ONLY) private String publisher; - /** Creates an instance of ExtensionValueProperties class. */ + /** + * Creates an instance of ExtensionValueProperties class. + */ public ExtensionValueProperties() { } /** * Get the version property: The version of the Extension being received. - * + * * @return the version value. */ public String version() { @@ -43,7 +47,7 @@ public String version() { /** * Get the extensionType property: The type of the Extension being received. - * + * * @return the extensionType value. */ public String extensionType() { @@ -52,7 +56,7 @@ public String extensionType() { /** * Get the publisher property: The publisher of the Extension being received. - * + * * @return the publisher value. */ public String publisher() { @@ -61,7 +65,7 @@ public String publisher() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridComputePrivateLinkScopeInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridComputePrivateLinkScopeInner.java index 6655bb8604dd..a631dc576dbc 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridComputePrivateLinkScopeInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridComputePrivateLinkScopeInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** An Azure Arc PrivateLinkScope definition. */ +/** + * An Azure Arc PrivateLinkScope definition. + */ @Fluent public final class HybridComputePrivateLinkScopeInner extends PrivateLinkScopesResource { /* @@ -26,13 +28,15 @@ public final class HybridComputePrivateLinkScopeInner extends PrivateLinkScopesR @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of HybridComputePrivateLinkScopeInner class. */ + /** + * Creates an instance of HybridComputePrivateLinkScopeInner class. + */ public HybridComputePrivateLinkScopeInner() { } /** * Get the properties property: Properties that define a Azure Arc PrivateLinkScope resource. - * + * * @return the properties value. */ public HybridComputePrivateLinkScopeProperties properties() { @@ -41,7 +45,7 @@ public HybridComputePrivateLinkScopeProperties properties() { /** * Set the properties property: Properties that define a Azure Arc PrivateLinkScope resource. - * + * * @param properties the properties value to set. * @return the HybridComputePrivateLinkScopeInner object itself. */ @@ -52,21 +56,25 @@ public HybridComputePrivateLinkScopeInner withProperties(HybridComputePrivateLin /** * Get the systemData property: The system meta data relating to this resource. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public HybridComputePrivateLinkScopeInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public HybridComputePrivateLinkScopeInner withTags(Map tags) { super.withTags(tags); @@ -75,7 +83,7 @@ public HybridComputePrivateLinkScopeInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridIdentityMetadataInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridIdentityMetadataInner.java deleted file mode 100644 index 288d87311573..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridIdentityMetadataInner.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hybridcompute.models.Identity; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Defines the HybridIdentityMetadata. */ -@Fluent -public final class HybridIdentityMetadataInner extends ProxyResource { - /* - * Resource properties. - */ - @JsonProperty(value = "properties", required = true) - private HybridIdentityMetadataProperties innerProperties = new HybridIdentityMetadataProperties(); - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of HybridIdentityMetadataInner class. */ - public HybridIdentityMetadataInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private HybridIdentityMetadataProperties 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 vmId property: The unique identifier for the resource. - * - * @return the vmId value. - */ - public String vmId() { - return this.innerProperties() == null ? null : this.innerProperties().vmId(); - } - - /** - * Set the vmId property: The unique identifier for the resource. - * - * @param vmId the vmId value to set. - * @return the HybridIdentityMetadataInner object itself. - */ - public HybridIdentityMetadataInner withVmId(String vmId) { - if (this.innerProperties() == null) { - this.innerProperties = new HybridIdentityMetadataProperties(); - } - this.innerProperties().withVmId(vmId); - return this; - } - - /** - * Get the publicKey property: The Public Key. - * - * @return the publicKey value. - */ - public String publicKey() { - return this.innerProperties() == null ? null : this.innerProperties().publicKey(); - } - - /** - * Set the publicKey property: The Public Key. - * - * @param publicKey the publicKey value to set. - * @return the HybridIdentityMetadataInner object itself. - */ - public HybridIdentityMetadataInner withPublicKey(String publicKey) { - if (this.innerProperties() == null) { - this.innerProperties = new HybridIdentityMetadataProperties(); - } - this.innerProperties().withPublicKey(publicKey); - return this; - } - - /** - * Get the identity property: Identity for the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.innerProperties() == null ? null : this.innerProperties().identity(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model HybridIdentityMetadataInner")); - } else { - innerProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HybridIdentityMetadataInner.class); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridIdentityMetadataProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridIdentityMetadataProperties.java deleted file mode 100644 index 04f76fb8a56a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/HybridIdentityMetadataProperties.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.hybridcompute.models.Identity; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Defines the resource properties. */ -@Fluent -public final class HybridIdentityMetadataProperties { - /* - * The unique identifier for the resource. - */ - @JsonProperty(value = "vmId") - private String vmId; - - /* - * The Public Key. - */ - @JsonProperty(value = "publicKey") - private String publicKey; - - /* - * Identity for the resource. - */ - @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY) - private Identity identity; - - /** Creates an instance of HybridIdentityMetadataProperties class. */ - public HybridIdentityMetadataProperties() { - } - - /** - * Get the vmId property: The unique identifier for the resource. - * - * @return the vmId value. - */ - public String vmId() { - return this.vmId; - } - - /** - * Set the vmId property: The unique identifier for the resource. - * - * @param vmId the vmId value to set. - * @return the HybridIdentityMetadataProperties object itself. - */ - public HybridIdentityMetadataProperties withVmId(String vmId) { - this.vmId = vmId; - return this; - } - - /** - * Get the publicKey property: The Public Key. - * - * @return the publicKey value. - */ - public String publicKey() { - return this.publicKey; - } - - /** - * Set the publicKey property: The Public Key. - * - * @param publicKey the publicKey value to set. - * @return the HybridIdentityMetadataProperties object itself. - */ - public HybridIdentityMetadataProperties withPublicKey(String publicKey) { - this.publicKey = publicKey; - return this; - } - - /** - * Get the identity property: Identity for the resource. - * - * @return the identity value. - */ - public Identity identity() { - return this.identity; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseInner.java deleted file mode 100644 index d75e46f85d24..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import com.azure.resourcemanager.hybridcompute.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Describes a license in a hybrid machine. */ -@Fluent -public final class LicenseInner extends Resource { - /* - * Hybrid Compute License properties - */ - @JsonProperty(value = "properties") - private LicenseProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of LicenseInner class. */ - public LicenseInner() { - } - - /** - * Get the innerProperties property: Hybrid Compute License properties. - * - * @return the innerProperties value. - */ - private LicenseProperties 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; - } - - /** {@inheritDoc} */ - @Override - public LicenseInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public LicenseInner 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 tenantId property: Describes the tenant id. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); - } - - /** - * Set the tenantId property: Describes the tenant id. - * - * @param tenantId the tenantId value to set. - * @return the LicenseInner object itself. - */ - public LicenseInner withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new LicenseProperties(); - } - this.innerProperties().withTenantId(tenantId); - return this; - } - - /** - * Get the licenseType property: The type of the license resource. - * - * @return the licenseType value. - */ - public LicenseType licenseType() { - return this.innerProperties() == null ? null : this.innerProperties().licenseType(); - } - - /** - * Set the licenseType property: The type of the license resource. - * - * @param licenseType the licenseType value to set. - * @return the LicenseInner object itself. - */ - public LicenseInner withLicenseType(LicenseType licenseType) { - if (this.innerProperties() == null) { - this.innerProperties = new LicenseProperties(); - } - this.innerProperties().withLicenseType(licenseType); - return this; - } - - /** - * Get the licenseDetails property: Describes the properties of a License. - * - * @return the licenseDetails value. - */ - public LicenseDetails licenseDetails() { - return this.innerProperties() == null ? null : this.innerProperties().licenseDetails(); - } - - /** - * Set the licenseDetails property: Describes the properties of a License. - * - * @param licenseDetails the licenseDetails value to set. - * @return the LicenseInner object itself. - */ - public LicenseInner withLicenseDetails(LicenseDetails licenseDetails) { - if (this.innerProperties() == null) { - this.innerProperties = new LicenseProperties(); - } - this.innerProperties().withLicenseDetails(licenseDetails); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmEsuProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmEsuProperties.java index 4675b6febe23..32e99265e0ec 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmEsuProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmEsuProperties.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.hybridcompute.models.LicenseProfileArmEsuPropertiesWithoutAssignedLicense; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the properties of a License Profile ARM model. */ +/** + * Describes the properties of a License Profile ARM model. + */ @Fluent public final class LicenseProfileArmEsuProperties extends LicenseProfileArmEsuPropertiesWithoutAssignedLicense { /* @@ -17,13 +19,15 @@ public final class LicenseProfileArmEsuProperties extends LicenseProfileArmEsuPr @JsonProperty(value = "assignedLicense") private String assignedLicense; - /** Creates an instance of LicenseProfileArmEsuProperties class. */ + /** + * Creates an instance of LicenseProfileArmEsuProperties class. + */ public LicenseProfileArmEsuProperties() { } /** * Get the assignedLicense property: The resource id of the license. - * + * * @return the assignedLicense value. */ public String assignedLicense() { @@ -32,7 +36,7 @@ public String assignedLicense() { /** * Set the assignedLicense property: The resource id of the license. - * + * * @param assignedLicense the assignedLicense value to set. * @return the LicenseProfileArmEsuProperties object itself. */ @@ -43,7 +47,7 @@ public LicenseProfileArmEsuProperties withAssignedLicense(String assignedLicense /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmProductProfileProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmProductProfileProperties.java new file mode 100644 index 000000000000..4118183fbf76 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileArmProductProfileProperties.java @@ -0,0 +1,160 @@ +// 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.resourcemanager.hybridcompute.models.LicenseProfileProductType; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatus; +import com.azure.resourcemanager.hybridcompute.models.ProductFeature; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * Describes the properties of a Product License Profile ARM model. + */ +@Fluent +public final class LicenseProfileArmProductProfileProperties { + /* + * Indicates the subscription status of the product. + */ + @JsonProperty(value = "subscriptionStatus") + private LicenseProfileSubscriptionStatus subscriptionStatus; + + /* + * Indicates the product type of the license. + */ + @JsonProperty(value = "productType") + private LicenseProfileProductType productType; + + /* + * The timestamp in UTC when the billing starts. + */ + @JsonProperty(value = "billingStartDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime billingStartDate; + + /* + * The timestamp in UTC when the user enrolls the feature. + */ + @JsonProperty(value = "enrollmentDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime enrollmentDate; + + /* + * The timestamp in UTC when the user disenrolled the feature. + */ + @JsonProperty(value = "disenrollmentDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime disenrollmentDate; + + /* + * The list of product features. + */ + @JsonProperty(value = "productFeatures") + private List productFeatures; + + /** + * Creates an instance of LicenseProfileArmProductProfileProperties class. + */ + public LicenseProfileArmProductProfileProperties() { + } + + /** + * Get the subscriptionStatus property: Indicates the subscription status of the product. + * + * @return the subscriptionStatus value. + */ + public LicenseProfileSubscriptionStatus subscriptionStatus() { + return this.subscriptionStatus; + } + + /** + * Set the subscriptionStatus property: Indicates the subscription status of the product. + * + * @param subscriptionStatus the subscriptionStatus value to set. + * @return the LicenseProfileArmProductProfileProperties object itself. + */ + public LicenseProfileArmProductProfileProperties + withSubscriptionStatus(LicenseProfileSubscriptionStatus subscriptionStatus) { + this.subscriptionStatus = subscriptionStatus; + return this; + } + + /** + * Get the productType property: Indicates the product type of the license. + * + * @return the productType value. + */ + public LicenseProfileProductType productType() { + return this.productType; + } + + /** + * Set the productType property: Indicates the product type of the license. + * + * @param productType the productType value to set. + * @return the LicenseProfileArmProductProfileProperties object itself. + */ + public LicenseProfileArmProductProfileProperties withProductType(LicenseProfileProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get the billingStartDate property: The timestamp in UTC when the billing starts. + * + * @return the billingStartDate value. + */ + public OffsetDateTime billingStartDate() { + return this.billingStartDate; + } + + /** + * Get the enrollmentDate property: The timestamp in UTC when the user enrolls the feature. + * + * @return the enrollmentDate value. + */ + public OffsetDateTime enrollmentDate() { + return this.enrollmentDate; + } + + /** + * Get the disenrollmentDate property: The timestamp in UTC when the user disenrolled the feature. + * + * @return the disenrollmentDate value. + */ + public OffsetDateTime disenrollmentDate() { + return this.disenrollmentDate; + } + + /** + * Get the productFeatures property: The list of product features. + * + * @return the productFeatures value. + */ + public List productFeatures() { + return this.productFeatures; + } + + /** + * Set the productFeatures property: The list of product features. + * + * @param productFeatures the productFeatures value to set. + * @return the LicenseProfileArmProductProfileProperties object itself. + */ + public LicenseProfileArmProductProfileProperties withProductFeatures(List productFeatures) { + this.productFeatures = productFeatures; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (productFeatures() != null) { + productFeatures().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileInner.java deleted file mode 100644 index bc0d498a982c..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileInner.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hybridcompute.models.EsuEligibility; -import com.azure.resourcemanager.hybridcompute.models.EsuKey; -import com.azure.resourcemanager.hybridcompute.models.EsuKeyState; -import com.azure.resourcemanager.hybridcompute.models.EsuServerType; -import com.azure.resourcemanager.hybridcompute.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Describes a license profile in a hybrid machine. */ -@Fluent -public final class LicenseProfileInner extends Resource { - /* - * Describe the properties of a license profile. - */ - @JsonProperty(value = "properties") - private LicenseProfileProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of LicenseProfileInner class. */ - public LicenseProfileInner() { - } - - /** - * Get the innerProperties property: Describe the properties of a license profile. - * - * @return the innerProperties value. - */ - private LicenseProfileProperties 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; - } - - /** {@inheritDoc} */ - @Override - public LicenseProfileInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public LicenseProfileInner 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 assignedLicense property: The resource id of the license. - * - * @return the assignedLicense value. - */ - public String assignedLicense() { - return this.innerProperties() == null ? null : this.innerProperties().assignedLicense(); - } - - /** - * Set the assignedLicense property: The resource id of the license. - * - * @param assignedLicense the assignedLicense value to set. - * @return the LicenseProfileInner object itself. - */ - public LicenseProfileInner withAssignedLicense(String assignedLicense) { - if (this.innerProperties() == null) { - this.innerProperties = new LicenseProfileProperties(); - } - this.innerProperties().withAssignedLicense(assignedLicense); - return this; - } - - /** - * Get the serverType property: The type of the Esu servers. - * - * @return the serverType value. - */ - public EsuServerType serverType() { - return this.innerProperties() == null ? null : this.innerProperties().serverType(); - } - - /** - * Get the esuEligibility property: Indicates the eligibility state of Esu. - * - * @return the esuEligibility value. - */ - public EsuEligibility esuEligibility() { - return this.innerProperties() == null ? null : this.innerProperties().esuEligibility(); - } - - /** - * Get the esuKeyState property: Indicates whether there is an ESU Key currently active for the machine. - * - * @return the esuKeyState value. - */ - public EsuKeyState esuKeyState() { - return this.innerProperties() == null ? null : this.innerProperties().esuKeyState(); - } - - /** - * Get the assignedLicenseImmutableId property: The guid id of the license. - * - * @return the assignedLicenseImmutableId value. - */ - public String assignedLicenseImmutableId() { - return this.innerProperties() == null ? null : this.innerProperties().assignedLicenseImmutableId(); - } - - /** - * Get the esuKeys property: The list of ESU keys. - * - * @return the esuKeys value. - */ - public List esuKeys() { - return this.innerProperties() == null ? null : this.innerProperties().esuKeys(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewEsuPropertiesInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewEsuPropertiesInner.java deleted file mode 100644 index a061c8af5002..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewEsuPropertiesInner.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.hybridcompute.models.LicenseAssignmentState; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileArmEsuPropertiesWithoutAssignedLicense; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties for the Machine ESU profile. */ -@Fluent -public final class LicenseProfileMachineInstanceViewEsuPropertiesInner - extends LicenseProfileArmEsuPropertiesWithoutAssignedLicense { - /* - * The assigned license resource. - */ - @JsonProperty(value = "assignedLicense") - private LicenseInner assignedLicense; - - /* - * Describes the license assignment state (Assigned or NotAssigned). - */ - @JsonProperty(value = "licenseAssignmentState") - private LicenseAssignmentState licenseAssignmentState; - - /** Creates an instance of LicenseProfileMachineInstanceViewEsuPropertiesInner class. */ - public LicenseProfileMachineInstanceViewEsuPropertiesInner() { - } - - /** - * Get the assignedLicense property: The assigned license resource. - * - * @return the assignedLicense value. - */ - public LicenseInner assignedLicense() { - return this.assignedLicense; - } - - /** - * Set the assignedLicense property: The assigned license resource. - * - * @param assignedLicense the assignedLicense value to set. - * @return the LicenseProfileMachineInstanceViewEsuPropertiesInner object itself. - */ - public LicenseProfileMachineInstanceViewEsuPropertiesInner withAssignedLicense(LicenseInner assignedLicense) { - this.assignedLicense = assignedLicense; - return this; - } - - /** - * Get the licenseAssignmentState property: Describes the license assignment state (Assigned or NotAssigned). - * - * @return the licenseAssignmentState value. - */ - public LicenseAssignmentState licenseAssignmentState() { - return this.licenseAssignmentState; - } - - /** - * Set the licenseAssignmentState property: Describes the license assignment state (Assigned or NotAssigned). - * - * @param licenseAssignmentState the licenseAssignmentState value to set. - * @return the LicenseProfileMachineInstanceViewEsuPropertiesInner object itself. - */ - public LicenseProfileMachineInstanceViewEsuPropertiesInner withLicenseAssignmentState( - LicenseAssignmentState licenseAssignmentState) { - this.licenseAssignmentState = licenseAssignmentState; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (assignedLicense() != null) { - assignedLicense().validate(); - } - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewInner.java deleted file mode 100644 index 0e6520ad9bbf..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewInner.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** License Profile Instance View in Machine Properties. */ -@Fluent -public final class LicenseProfileMachineInstanceViewInner { - /* - * Properties for the Machine ESU profile. - */ - @JsonProperty(value = "esuProfile") - private LicenseProfileMachineInstanceViewEsuPropertiesInner esuProfile; - - /** Creates an instance of LicenseProfileMachineInstanceViewInner class. */ - public LicenseProfileMachineInstanceViewInner() { - } - - /** - * Get the esuProfile property: Properties for the Machine ESU profile. - * - * @return the esuProfile value. - */ - public LicenseProfileMachineInstanceViewEsuPropertiesInner esuProfile() { - return this.esuProfile; - } - - /** - * Set the esuProfile property: Properties for the Machine ESU profile. - * - * @param esuProfile the esuProfile value to set. - * @return the LicenseProfileMachineInstanceViewInner object itself. - */ - public LicenseProfileMachineInstanceViewInner withEsuProfile( - LicenseProfileMachineInstanceViewEsuPropertiesInner esuProfile) { - this.esuProfile = esuProfile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (esuProfile() != null) { - esuProfile().validate(); - } - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewSoftwareAssurance.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewSoftwareAssurance.java new file mode 100644 index 000000000000..53208930caa8 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileMachineInstanceViewSoftwareAssurance.java @@ -0,0 +1,57 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The LicenseProfileMachineInstanceViewSoftwareAssurance model. + */ +@Fluent +public final class LicenseProfileMachineInstanceViewSoftwareAssurance { + /* + * Specifies if this machine is licensed as part of a Software Assurance agreement. + */ + @JsonProperty(value = "softwareAssuranceCustomer") + private Boolean softwareAssuranceCustomer; + + /** + * Creates an instance of LicenseProfileMachineInstanceViewSoftwareAssurance class. + */ + public LicenseProfileMachineInstanceViewSoftwareAssurance() { + } + + /** + * Get the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @return the softwareAssuranceCustomer value. + */ + public Boolean softwareAssuranceCustomer() { + return this.softwareAssuranceCustomer; + } + + /** + * Set the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @param softwareAssuranceCustomer the softwareAssuranceCustomer value to set. + * @return the LicenseProfileMachineInstanceViewSoftwareAssurance object itself. + */ + public LicenseProfileMachineInstanceViewSoftwareAssurance + withSoftwareAssuranceCustomer(Boolean softwareAssuranceCustomer) { + this.softwareAssuranceCustomer = softwareAssuranceCustomer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileProperties.java deleted file mode 100644 index fdee30e5357b..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileProperties.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.hybridcompute.models.EsuEligibility; -import com.azure.resourcemanager.hybridcompute.models.EsuKey; -import com.azure.resourcemanager.hybridcompute.models.EsuKeyState; -import com.azure.resourcemanager.hybridcompute.models.EsuServerType; -import com.azure.resourcemanager.hybridcompute.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describe the properties of a license profile. */ -@Fluent -public final class LicenseProfileProperties { - /* - * Hybrid Compute ESU Profile properties - */ - @JsonProperty(value = "esuProfile") - private LicenseProfileArmEsuProperties innerEsuProfile; - - /* - * The provisioning state, which only appears in the response. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /** Creates an instance of LicenseProfileProperties class. */ - public LicenseProfileProperties() { - } - - /** - * Get the innerEsuProfile property: Hybrid Compute ESU Profile properties. - * - * @return the innerEsuProfile value. - */ - private LicenseProfileArmEsuProperties innerEsuProfile() { - return this.innerEsuProfile; - } - - /** - * 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 assignedLicense property: The resource id of the license. - * - * @return the assignedLicense value. - */ - public String assignedLicense() { - return this.innerEsuProfile() == null ? null : this.innerEsuProfile().assignedLicense(); - } - - /** - * Set the assignedLicense property: The resource id of the license. - * - * @param assignedLicense the assignedLicense value to set. - * @return the LicenseProfileProperties object itself. - */ - public LicenseProfileProperties withAssignedLicense(String assignedLicense) { - if (this.innerEsuProfile() == null) { - this.innerEsuProfile = new LicenseProfileArmEsuProperties(); - } - this.innerEsuProfile().withAssignedLicense(assignedLicense); - return this; - } - - /** - * Get the serverType property: The type of the Esu servers. - * - * @return the serverType value. - */ - public EsuServerType serverType() { - return this.innerEsuProfile() == null ? null : this.innerEsuProfile().serverType(); - } - - /** - * Get the esuEligibility property: Indicates the eligibility state of Esu. - * - * @return the esuEligibility value. - */ - public EsuEligibility esuEligibility() { - return this.innerEsuProfile() == null ? null : this.innerEsuProfile().esuEligibility(); - } - - /** - * Get the esuKeyState property: Indicates whether there is an ESU Key currently active for the machine. - * - * @return the esuKeyState value. - */ - public EsuKeyState esuKeyState() { - return this.innerEsuProfile() == null ? null : this.innerEsuProfile().esuKeyState(); - } - - /** - * Get the assignedLicenseImmutableId property: The guid id of the license. - * - * @return the assignedLicenseImmutableId value. - */ - public String assignedLicenseImmutableId() { - return this.innerEsuProfile() == null ? null : this.innerEsuProfile().assignedLicenseImmutableId(); - } - - /** - * Get the esuKeys property: The list of ESU keys. - * - * @return the esuKeys value. - */ - public List esuKeys() { - return this.innerEsuProfile() == null ? null : this.innerEsuProfile().esuKeys(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerEsuProfile() != null) { - innerEsuProfile().validate(); - } - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdateProperties.java index 3e97daf3ef5b..d9a5ac29dd12 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdateProperties.java @@ -5,33 +5,96 @@ package com.azure.resourcemanager.hybridcompute.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; +import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** Describe the Update properties of a license profile. */ +/** + * Describe the Update properties of a license profile. + */ @Fluent public final class LicenseProfileUpdateProperties { + /* + * The softwareAssurance property. + */ + @JsonProperty(value = "softwareAssurance") + private LicenseProfileUpdatePropertiesSoftwareAssurance innerSoftwareAssurance; + /* * Hybrid Compute ESU Profile Update properties */ @JsonProperty(value = "esuProfile") private EsuProfileUpdateProperties innerEsuProfile; - /** Creates an instance of LicenseProfileUpdateProperties class. */ + /* + * Hybrid Compute Product Profile Update properties + */ + @JsonProperty(value = "productProfile") + private ProductProfileUpdateProperties innerProductProfile; + + /** + * Creates an instance of LicenseProfileUpdateProperties class. + */ public LicenseProfileUpdateProperties() { } + /** + * Get the innerSoftwareAssurance property: The softwareAssurance property. + * + * @return the innerSoftwareAssurance value. + */ + private LicenseProfileUpdatePropertiesSoftwareAssurance innerSoftwareAssurance() { + return this.innerSoftwareAssurance; + } + /** * Get the innerEsuProfile property: Hybrid Compute ESU Profile Update properties. - * + * * @return the innerEsuProfile value. */ private EsuProfileUpdateProperties innerEsuProfile() { return this.innerEsuProfile; } + /** + * Get the innerProductProfile property: Hybrid Compute Product Profile Update properties. + * + * @return the innerProductProfile value. + */ + private ProductProfileUpdateProperties innerProductProfile() { + return this.innerProductProfile; + } + + /** + * Get the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @return the softwareAssuranceCustomer value. + */ + public Boolean softwareAssuranceCustomer() { + return this.innerSoftwareAssurance() == null ? null : this.innerSoftwareAssurance().softwareAssuranceCustomer(); + } + + /** + * Set the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @param softwareAssuranceCustomer the softwareAssuranceCustomer value to set. + * @return the LicenseProfileUpdateProperties object itself. + */ + public LicenseProfileUpdateProperties withSoftwareAssuranceCustomer(Boolean softwareAssuranceCustomer) { + if (this.innerSoftwareAssurance() == null) { + this.innerSoftwareAssurance = new LicenseProfileUpdatePropertiesSoftwareAssurance(); + } + this.innerSoftwareAssurance().withSoftwareAssuranceCustomer(softwareAssuranceCustomer); + return this; + } + /** * Get the assignedLicense property: The resource id of the license. - * + * * @return the assignedLicense value. */ public String assignedLicense() { @@ -40,7 +103,7 @@ public String assignedLicense() { /** * Set the assignedLicense property: The resource id of the license. - * + * * @param assignedLicense the assignedLicense value to set. * @return the LicenseProfileUpdateProperties object itself. */ @@ -52,14 +115,90 @@ public LicenseProfileUpdateProperties withAssignedLicense(String assignedLicense return this; } + /** + * Get the subscriptionStatus property: Indicates the subscription status of the product. + * + * @return the subscriptionStatus value. + */ + public LicenseProfileSubscriptionStatusUpdate subscriptionStatus() { + return this.innerProductProfile() == null ? null : this.innerProductProfile().subscriptionStatus(); + } + + /** + * Set the subscriptionStatus property: Indicates the subscription status of the product. + * + * @param subscriptionStatus the subscriptionStatus value to set. + * @return the LicenseProfileUpdateProperties object itself. + */ + public LicenseProfileUpdateProperties + withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate subscriptionStatus) { + if (this.innerProductProfile() == null) { + this.innerProductProfile = new ProductProfileUpdateProperties(); + } + this.innerProductProfile().withSubscriptionStatus(subscriptionStatus); + return this; + } + + /** + * Get the productType property: Indicates the product type of the license. + * + * @return the productType value. + */ + public LicenseProfileProductType productType() { + return this.innerProductProfile() == null ? null : this.innerProductProfile().productType(); + } + + /** + * Set the productType property: Indicates the product type of the license. + * + * @param productType the productType value to set. + * @return the LicenseProfileUpdateProperties object itself. + */ + public LicenseProfileUpdateProperties withProductType(LicenseProfileProductType productType) { + if (this.innerProductProfile() == null) { + this.innerProductProfile = new ProductProfileUpdateProperties(); + } + this.innerProductProfile().withProductType(productType); + return this; + } + + /** + * Get the productFeatures property: The list of product feature updates. + * + * @return the productFeatures value. + */ + public List productFeatures() { + return this.innerProductProfile() == null ? null : this.innerProductProfile().productFeatures(); + } + + /** + * Set the productFeatures property: The list of product feature updates. + * + * @param productFeatures the productFeatures value to set. + * @return the LicenseProfileUpdateProperties object itself. + */ + public LicenseProfileUpdateProperties withProductFeatures(List productFeatures) { + if (this.innerProductProfile() == null) { + this.innerProductProfile = new ProductProfileUpdateProperties(); + } + this.innerProductProfile().withProductFeatures(productFeatures); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (innerSoftwareAssurance() != null) { + innerSoftwareAssurance().validate(); + } if (innerEsuProfile() != null) { innerEsuProfile().validate(); } + if (innerProductProfile() != null) { + innerProductProfile().validate(); + } } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdatePropertiesSoftwareAssurance.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdatePropertiesSoftwareAssurance.java new file mode 100644 index 000000000000..59ddbe3a00a7 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProfileUpdatePropertiesSoftwareAssurance.java @@ -0,0 +1,57 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The LicenseProfileUpdatePropertiesSoftwareAssurance model. + */ +@Fluent +public final class LicenseProfileUpdatePropertiesSoftwareAssurance { + /* + * Specifies if this machine is licensed as part of a Software Assurance agreement. + */ + @JsonProperty(value = "softwareAssuranceCustomer") + private Boolean softwareAssuranceCustomer; + + /** + * Creates an instance of LicenseProfileUpdatePropertiesSoftwareAssurance class. + */ + public LicenseProfileUpdatePropertiesSoftwareAssurance() { + } + + /** + * Get the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @return the softwareAssuranceCustomer value. + */ + public Boolean softwareAssuranceCustomer() { + return this.softwareAssuranceCustomer; + } + + /** + * Set the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @param softwareAssuranceCustomer the softwareAssuranceCustomer value to set. + * @return the LicenseProfileUpdatePropertiesSoftwareAssurance object itself. + */ + public LicenseProfileUpdatePropertiesSoftwareAssurance + withSoftwareAssuranceCustomer(Boolean softwareAssuranceCustomer) { + this.softwareAssuranceCustomer = softwareAssuranceCustomer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProperties.java index ecc7fb845ac7..1e669da96e5c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseProperties.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.hybridcompute.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the properties of a License Profile. */ +/** + * Describes the properties of a License Profile. + */ @Fluent public final class LicenseProperties { /* @@ -37,13 +39,15 @@ public final class LicenseProperties { @JsonProperty(value = "licenseDetails") private LicenseDetails licenseDetails; - /** Creates an instance of LicenseProperties class. */ + /** + * Creates an instance of LicenseProperties class. + */ public LicenseProperties() { } /** * Get the provisioningState property: The provisioning state, which only appears in the response. - * + * * @return the provisioningState value. */ public ProvisioningState provisioningState() { @@ -52,7 +56,7 @@ public ProvisioningState provisioningState() { /** * Get the tenantId property: Describes the tenant id. - * + * * @return the tenantId value. */ public String tenantId() { @@ -61,7 +65,7 @@ public String tenantId() { /** * Set the tenantId property: Describes the tenant id. - * + * * @param tenantId the tenantId value to set. * @return the LicenseProperties object itself. */ @@ -72,7 +76,7 @@ public LicenseProperties withTenantId(String tenantId) { /** * Get the licenseType property: The type of the license resource. - * + * * @return the licenseType value. */ public LicenseType licenseType() { @@ -81,7 +85,7 @@ public LicenseType licenseType() { /** * Set the licenseType property: The type of the license resource. - * + * * @param licenseType the licenseType value to set. * @return the LicenseProperties object itself. */ @@ -92,7 +96,7 @@ public LicenseProperties withLicenseType(LicenseType licenseType) { /** * Get the licenseDetails property: Describes the properties of a License. - * + * * @return the licenseDetails value. */ public LicenseDetails licenseDetails() { @@ -101,7 +105,7 @@ public LicenseDetails licenseDetails() { /** * Set the licenseDetails property: Describes the properties of a License. - * + * * @param licenseDetails the licenseDetails value to set. * @return the LicenseProperties object itself. */ @@ -112,7 +116,7 @@ public LicenseProperties withLicenseDetails(LicenseDetails licenseDetails) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdateProperties.java index d219afcc2400..e47ca9c1eee3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdateProperties.java @@ -12,7 +12,9 @@ import com.azure.resourcemanager.hybridcompute.models.LicenseType; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the Update properties of a License Profile. */ +/** + * Describes the Update properties of a License Profile. + */ @Fluent public final class LicenseUpdateProperties { /* @@ -27,13 +29,15 @@ public final class LicenseUpdateProperties { @JsonProperty(value = "licenseDetails") private LicenseUpdatePropertiesLicenseDetails innerLicenseDetails; - /** Creates an instance of LicenseUpdateProperties class. */ + /** + * Creates an instance of LicenseUpdateProperties class. + */ public LicenseUpdateProperties() { } /** * Get the licenseType property: The type of the license resource. - * + * * @return the licenseType value. */ public LicenseType licenseType() { @@ -42,7 +46,7 @@ public LicenseType licenseType() { /** * Set the licenseType property: The type of the license resource. - * + * * @param licenseType the licenseType value to set. * @return the LicenseUpdateProperties object itself. */ @@ -53,7 +57,7 @@ public LicenseUpdateProperties withLicenseType(LicenseType licenseType) { /** * Get the innerLicenseDetails property: The licenseDetails property. - * + * * @return the innerLicenseDetails value. */ private LicenseUpdatePropertiesLicenseDetails innerLicenseDetails() { @@ -62,7 +66,7 @@ private LicenseUpdatePropertiesLicenseDetails innerLicenseDetails() { /** * Get the state property: Describes the state of the license. - * + * * @return the state value. */ public LicenseState state() { @@ -71,7 +75,7 @@ public LicenseState state() { /** * Set the state property: Describes the state of the license. - * + * * @param state the state value to set. * @return the LicenseUpdateProperties object itself. */ @@ -85,7 +89,7 @@ public LicenseUpdateProperties withState(LicenseState state) { /** * Get the target property: Describes the license target server. - * + * * @return the target value. */ public LicenseTarget target() { @@ -94,7 +98,7 @@ public LicenseTarget target() { /** * Set the target property: Describes the license target server. - * + * * @param target the target value to set. * @return the LicenseUpdateProperties object itself. */ @@ -108,7 +112,7 @@ public LicenseUpdateProperties withTarget(LicenseTarget target) { /** * Get the edition property: Describes the edition of the license. The values are either Standard or Datacenter. - * + * * @return the edition value. */ public LicenseEdition edition() { @@ -117,7 +121,7 @@ public LicenseEdition edition() { /** * Set the edition property: Describes the edition of the license. The values are either Standard or Datacenter. - * + * * @param edition the edition value to set. * @return the LicenseUpdateProperties object itself. */ @@ -131,7 +135,7 @@ public LicenseUpdateProperties withEdition(LicenseEdition edition) { /** * Get the type property: Describes the license core type (pCore or vCore). - * + * * @return the type value. */ public LicenseCoreType type() { @@ -140,7 +144,7 @@ public LicenseCoreType type() { /** * Set the type property: Describes the license core type (pCore or vCore). - * + * * @param type the type value to set. * @return the LicenseUpdateProperties object itself. */ @@ -154,7 +158,7 @@ public LicenseUpdateProperties withType(LicenseCoreType type) { /** * Get the processors property: Describes the number of processors. - * + * * @return the processors value. */ public Integer processors() { @@ -163,7 +167,7 @@ public Integer processors() { /** * Set the processors property: Describes the number of processors. - * + * * @param processors the processors value to set. * @return the LicenseUpdateProperties object itself. */ @@ -177,7 +181,7 @@ public LicenseUpdateProperties withProcessors(Integer processors) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdatePropertiesLicenseDetails.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdatePropertiesLicenseDetails.java index 03b0ab0ed782..4f54fe2bb3c1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdatePropertiesLicenseDetails.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/LicenseUpdatePropertiesLicenseDetails.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; import com.fasterxml.jackson.annotation.JsonProperty; -/** The LicenseUpdatePropertiesLicenseDetails model. */ +/** + * The LicenseUpdatePropertiesLicenseDetails model. + */ @Fluent public final class LicenseUpdatePropertiesLicenseDetails { /* @@ -44,13 +46,15 @@ public final class LicenseUpdatePropertiesLicenseDetails { @JsonProperty(value = "processors") private Integer processors; - /** Creates an instance of LicenseUpdatePropertiesLicenseDetails class. */ + /** + * Creates an instance of LicenseUpdatePropertiesLicenseDetails class. + */ public LicenseUpdatePropertiesLicenseDetails() { } /** * Get the state property: Describes the state of the license. - * + * * @return the state value. */ public LicenseState state() { @@ -59,7 +63,7 @@ public LicenseState state() { /** * Set the state property: Describes the state of the license. - * + * * @param state the state value to set. * @return the LicenseUpdatePropertiesLicenseDetails object itself. */ @@ -70,7 +74,7 @@ public LicenseUpdatePropertiesLicenseDetails withState(LicenseState state) { /** * Get the target property: Describes the license target server. - * + * * @return the target value. */ public LicenseTarget target() { @@ -79,7 +83,7 @@ public LicenseTarget target() { /** * Set the target property: Describes the license target server. - * + * * @param target the target value to set. * @return the LicenseUpdatePropertiesLicenseDetails object itself. */ @@ -90,7 +94,7 @@ public LicenseUpdatePropertiesLicenseDetails withTarget(LicenseTarget target) { /** * Get the edition property: Describes the edition of the license. The values are either Standard or Datacenter. - * + * * @return the edition value. */ public LicenseEdition edition() { @@ -99,7 +103,7 @@ public LicenseEdition edition() { /** * Set the edition property: Describes the edition of the license. The values are either Standard or Datacenter. - * + * * @param edition the edition value to set. * @return the LicenseUpdatePropertiesLicenseDetails object itself. */ @@ -110,7 +114,7 @@ public LicenseUpdatePropertiesLicenseDetails withEdition(LicenseEdition edition) /** * Get the type property: Describes the license core type (pCore or vCore). - * + * * @return the type value. */ public LicenseCoreType type() { @@ -119,7 +123,7 @@ public LicenseCoreType type() { /** * Set the type property: Describes the license core type (pCore or vCore). - * + * * @param type the type value to set. * @return the LicenseUpdatePropertiesLicenseDetails object itself. */ @@ -130,7 +134,7 @@ public LicenseUpdatePropertiesLicenseDetails withType(LicenseCoreType type) { /** * Get the processors property: Describes the number of processors. - * + * * @return the processors value. */ public Integer processors() { @@ -139,7 +143,7 @@ public Integer processors() { /** * Set the processors property: Describes the number of processors. - * + * * @param processors the processors value to set. * @return the LicenseUpdatePropertiesLicenseDetails object itself. */ @@ -150,7 +154,7 @@ public LicenseUpdatePropertiesLicenseDetails withProcessors(Integer processors) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineAssessPatchesResultInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineAssessPatchesResultInner.java index 7b9d96ca3f06..10e912b3af8a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineAssessPatchesResultInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineAssessPatchesResultInner.java @@ -13,13 +13,15 @@ import com.azure.resourcemanager.hybridcompute.models.PatchServiceUsed; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; +import java.util.UUID; -/** Describes the properties of an AssessPatches result. */ +/** + * Describes the properties of an AssessPatches result. + */ @Fluent public final class MachineAssessPatchesResultInner { /* - * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. - * At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings." */ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private PatchOperationStatus status; @@ -28,11 +30,10 @@ public final class MachineAssessPatchesResultInner { * The activity ID of the operation that produced this result. */ @JsonProperty(value = "assessmentActivityId", access = JsonProperty.Access.WRITE_ONLY) - private String assessmentActivityId; + private UUID assessmentActivityId; /* - * The overall reboot status of the VM. It will be true when partially installed patches require a reboot to - * complete installation but the reboot has not yet occurred. + * The overall reboot status of the VM. It will be true when partially installed patches require a reboot to complete installation but the reboot has not yet occurred. */ @JsonProperty(value = "rebootPending", access = JsonProperty.Access.WRITE_ONLY) private Boolean rebootPending; @@ -79,7 +80,9 @@ public final class MachineAssessPatchesResultInner { @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY) private ManagementError errorDetails; - /** Creates an instance of MachineAssessPatchesResultInner class. */ + /** + * Creates an instance of MachineAssessPatchesResultInner class. + */ public MachineAssessPatchesResultInner() { } @@ -87,7 +90,7 @@ public MachineAssessPatchesResultInner() { * Get the status property: The overall success or failure status of the operation. It remains "InProgress" until * the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or * "CompletedWithWarnings.". - * + * * @return the status value. */ public PatchOperationStatus status() { @@ -96,17 +99,17 @@ public PatchOperationStatus status() { /** * Get the assessmentActivityId property: The activity ID of the operation that produced this result. - * + * * @return the assessmentActivityId value. */ - public String assessmentActivityId() { + public UUID assessmentActivityId() { return this.assessmentActivityId; } /** * Get the rebootPending property: The overall reboot status of the VM. It will be true when partially installed * patches require a reboot to complete installation but the reboot has not yet occurred. - * + * * @return the rebootPending value. */ public Boolean rebootPending() { @@ -116,7 +119,7 @@ public Boolean rebootPending() { /** * Get the availablePatchCountByClassification property: Summarization of patches available for installation on the * machine by classification. - * + * * @return the availablePatchCountByClassification value. */ public AvailablePatchCountByClassification availablePatchCountByClassification() { @@ -126,7 +129,7 @@ public AvailablePatchCountByClassification availablePatchCountByClassification() /** * Set the availablePatchCountByClassification property: Summarization of patches available for installation on the * machine by classification. - * + * * @param availablePatchCountByClassification the availablePatchCountByClassification value to set. * @return the MachineAssessPatchesResultInner object itself. */ @@ -138,7 +141,7 @@ public MachineAssessPatchesResultInner withAvailablePatchCountByClassification( /** * Get the startDateTime property: The UTC timestamp when the operation began. - * + * * @return the startDateTime value. */ public OffsetDateTime startDateTime() { @@ -147,7 +150,7 @@ public OffsetDateTime startDateTime() { /** * Get the lastModifiedDateTime property: The UTC timestamp when the operation finished. - * + * * @return the lastModifiedDateTime value. */ public OffsetDateTime lastModifiedDateTime() { @@ -156,7 +159,7 @@ public OffsetDateTime lastModifiedDateTime() { /** * Get the startedBy property: Indicates if operation was triggered by user or by platform. - * + * * @return the startedBy value. */ public PatchOperationStartedBy startedBy() { @@ -165,7 +168,7 @@ public PatchOperationStartedBy startedBy() { /** * Get the patchServiceUsed property: Specifies the patch service used for the operation. - * + * * @return the patchServiceUsed value. */ public PatchServiceUsed patchServiceUsed() { @@ -174,7 +177,7 @@ public PatchServiceUsed patchServiceUsed() { /** * Get the osType property: The operating system type of the machine. - * + * * @return the osType value. */ public OsType osType() { @@ -184,7 +187,7 @@ public OsType osType() { /** * Get the errorDetails property: The errors that were encountered during execution of the operation. The details * array contains the list of them. - * + * * @return the errorDetails value. */ public ManagementError errorDetails() { @@ -193,7 +196,7 @@ public ManagementError errorDetails() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionInner.java index 5501264ebd43..af04602310de 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Describes a Machine Extension. */ +/** + * Describes a Machine Extension. + */ @Fluent public final class MachineExtensionInner extends Resource { /* @@ -26,13 +28,15 @@ public final class MachineExtensionInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of MachineExtensionInner class. */ + /** + * Creates an instance of MachineExtensionInner class. + */ public MachineExtensionInner() { } /** * Get the properties property: Describes Machine Extension Properties. - * + * * @return the properties value. */ public MachineExtensionProperties properties() { @@ -41,7 +45,7 @@ public MachineExtensionProperties properties() { /** * Set the properties property: Describes Machine Extension Properties. - * + * * @param properties the properties value to set. * @return the MachineExtensionInner object itself. */ @@ -52,21 +56,25 @@ public MachineExtensionInner withProperties(MachineExtensionProperties propertie /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MachineExtensionInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MachineExtensionInner withTags(Map tags) { super.withTags(tags); @@ -75,7 +83,7 @@ public MachineExtensionInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionUpdateProperties.java index 18a4c376960b..d13d778945c7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineExtensionUpdateProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Describes the properties of a Machine Extension. */ +/** + * Describes the properties of a Machine Extension. + */ @Fluent public final class MachineExtensionUpdateProperties { /* @@ -37,16 +39,13 @@ public final class MachineExtensionUpdateProperties { private String typeHandlerVersion; /* - * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version - * available. + * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ @JsonProperty(value = "enableAutomaticUpgrade") private Boolean enableAutomaticUpgrade; /* - * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once - * deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set - * to true. + * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ @JsonProperty(value = "autoUpgradeMinorVersion") private Boolean autoUpgradeMinorVersion; @@ -59,21 +58,22 @@ public final class MachineExtensionUpdateProperties { private Map settings; /* - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at - * all. + * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ @JsonProperty(value = "protectedSettings") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map protectedSettings; - /** Creates an instance of MachineExtensionUpdateProperties class. */ + /** + * Creates an instance of MachineExtensionUpdateProperties class. + */ public MachineExtensionUpdateProperties() { } /** * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension * configuration has not changed. - * + * * @return the forceUpdateTag value. */ public String forceUpdateTag() { @@ -83,7 +83,7 @@ public String forceUpdateTag() { /** * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension * configuration has not changed. - * + * * @param forceUpdateTag the forceUpdateTag value to set. * @return the MachineExtensionUpdateProperties object itself. */ @@ -94,7 +94,7 @@ public MachineExtensionUpdateProperties withForceUpdateTag(String forceUpdateTag /** * Get the publisher property: The name of the extension handler publisher. - * + * * @return the publisher value. */ public String publisher() { @@ -103,7 +103,7 @@ public String publisher() { /** * Set the publisher property: The name of the extension handler publisher. - * + * * @param publisher the publisher value to set. * @return the MachineExtensionUpdateProperties object itself. */ @@ -114,7 +114,7 @@ public MachineExtensionUpdateProperties withPublisher(String publisher) { /** * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension". - * + * * @return the type value. */ public String type() { @@ -123,7 +123,7 @@ public String type() { /** * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension". - * + * * @param type the type value to set. * @return the MachineExtensionUpdateProperties object itself. */ @@ -134,7 +134,7 @@ public MachineExtensionUpdateProperties withType(String type) { /** * Get the typeHandlerVersion property: Specifies the version of the script handler. - * + * * @return the typeHandlerVersion value. */ public String typeHandlerVersion() { @@ -143,7 +143,7 @@ public String typeHandlerVersion() { /** * Set the typeHandlerVersion property: Specifies the version of the script handler. - * + * * @param typeHandlerVersion the typeHandlerVersion value to set. * @return the MachineExtensionUpdateProperties object itself. */ @@ -155,7 +155,7 @@ public MachineExtensionUpdateProperties withTypeHandlerVersion(String typeHandle /** * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the * platform if there is a newer version available. - * + * * @return the enableAutomaticUpgrade value. */ public Boolean enableAutomaticUpgrade() { @@ -165,7 +165,7 @@ public Boolean enableAutomaticUpgrade() { /** * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the * platform if there is a newer version available. - * + * * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. * @return the MachineExtensionUpdateProperties object itself. */ @@ -178,7 +178,7 @@ public MachineExtensionUpdateProperties withEnableAutomaticUpgrade(Boolean enabl * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless * redeployed, even with this property set to true. - * + * * @return the autoUpgradeMinorVersion value. */ public Boolean autoUpgradeMinorVersion() { @@ -189,7 +189,7 @@ public Boolean autoUpgradeMinorVersion() { * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless * redeployed, even with this property set to true. - * + * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. * @return the MachineExtensionUpdateProperties object itself. */ @@ -200,7 +200,7 @@ public MachineExtensionUpdateProperties withAutoUpgradeMinorVersion(Boolean auto /** * Get the settings property: Json formatted public settings for the extension. - * + * * @return the settings value. */ public Map settings() { @@ -209,7 +209,7 @@ public Map settings() { /** * Set the settings property: Json formatted public settings for the extension. - * + * * @param settings the settings value to set. * @return the MachineExtensionUpdateProperties object itself. */ @@ -221,7 +221,7 @@ public MachineExtensionUpdateProperties withSettings(Map setting /** * Get the protectedSettings property: The extension can contain either protectedSettings or * protectedSettingsFromKeyVault or no protected settings at all. - * + * * @return the protectedSettings value. */ public Map protectedSettings() { @@ -231,7 +231,7 @@ public Map protectedSettings() { /** * Set the protectedSettings property: The extension can contain either protectedSettings or * protectedSettingsFromKeyVault or no protected settings at all. - * + * * @param protectedSettings the protectedSettings value to set. * @return the MachineExtensionUpdateProperties object itself. */ @@ -242,7 +242,7 @@ public MachineExtensionUpdateProperties withProtectedSettings(Map resources() { @@ -80,7 +86,7 @@ public List resources() { /** * Get the identity property: Identity for the resource. - * + * * @return the identity value. */ public Identity identity() { @@ -89,7 +95,7 @@ public Identity identity() { /** * Set the identity property: Identity for the resource. - * + * * @param identity the identity value to set. * @return the MachineInner object itself. */ @@ -101,7 +107,7 @@ public MachineInner withIdentity(Identity identity) { /** * Get the kind property: Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware * etc. - * + * * @return the kind value. */ public ArcKindEnum kind() { @@ -111,7 +117,7 @@ public ArcKindEnum kind() { /** * Set the kind property: Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware * etc. - * + * * @param kind the kind value to set. * @return the MachineInner object itself. */ @@ -122,21 +128,25 @@ public MachineInner withKind(ArcKindEnum kind) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MachineInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MachineInner withTags(Map tags) { super.withTags(tags); @@ -145,7 +155,7 @@ public MachineInner withTags(Map tags) { /** * Get the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @return the locationData value. */ public LocationData locationData() { @@ -154,7 +164,7 @@ public LocationData locationData() { /** * Set the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @param locationData the locationData value to set. * @return the MachineInner object itself. */ @@ -169,7 +179,7 @@ public MachineInner withLocationData(LocationData locationData) { /** * Get the agentConfiguration property: Configurable properties that the user can set locally via the azcmagent * config command, or remotely via ARM. - * + * * @return the agentConfiguration value. */ public AgentConfiguration agentConfiguration() { @@ -178,7 +188,7 @@ public AgentConfiguration agentConfiguration() { /** * Get the serviceStatuses property: Statuses of dependent services that are reported back to ARM. - * + * * @return the serviceStatuses value. */ public ServiceStatuses serviceStatuses() { @@ -187,7 +197,7 @@ public ServiceStatuses serviceStatuses() { /** * Set the serviceStatuses property: Statuses of dependent services that are reported back to ARM. - * + * * @param serviceStatuses the serviceStatuses value to set. * @return the MachineInner object itself. */ @@ -201,7 +211,7 @@ public MachineInner withServiceStatuses(ServiceStatuses serviceStatuses) { /** * Get the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @return the cloudMetadata value. */ public CloudMetadata cloudMetadata() { @@ -210,7 +220,7 @@ public CloudMetadata cloudMetadata() { /** * Set the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @param cloudMetadata the cloudMetadata value to set. * @return the MachineInner object itself. */ @@ -224,7 +234,7 @@ public MachineInner withCloudMetadata(CloudMetadata cloudMetadata) { /** * Get the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @return the agentUpgrade value. */ public AgentUpgrade agentUpgrade() { @@ -233,7 +243,7 @@ public AgentUpgrade agentUpgrade() { /** * Set the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @param agentUpgrade the agentUpgrade value to set. * @return the MachineInner object itself. */ @@ -247,7 +257,7 @@ public MachineInner withAgentUpgrade(AgentUpgrade agentUpgrade) { /** * Get the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @return the osProfile value. */ public OSProfile osProfile() { @@ -256,7 +266,7 @@ public OSProfile osProfile() { /** * Set the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @param osProfile the osProfile value to set. * @return the MachineInner object itself. */ @@ -269,21 +279,21 @@ public MachineInner withOsProfile(OSProfile osProfile) { } /** - * Get the licenseProfile property: Specifies the ESU related properties for a machine. - * + * Get the licenseProfile property: Specifies the License related properties for a machine. + * * @return the licenseProfile value. */ - public LicenseProfileMachineInstanceViewInner licenseProfile() { + public LicenseProfileMachineInstanceView licenseProfile() { return this.innerProperties() == null ? null : this.innerProperties().licenseProfile(); } /** - * Set the licenseProfile property: Specifies the ESU related properties for a machine. - * + * Set the licenseProfile property: Specifies the License related properties for a machine. + * * @param licenseProfile the licenseProfile value to set. * @return the MachineInner object itself. */ - public MachineInner withLicenseProfile(LicenseProfileMachineInstanceViewInner licenseProfile) { + public MachineInner withLicenseProfile(LicenseProfileMachineInstanceView licenseProfile) { if (this.innerProperties() == null) { this.innerProperties = new MachinePropertiesInner(); } @@ -293,7 +303,7 @@ public MachineInner withLicenseProfile(LicenseProfileMachineInstanceViewInner li /** * Get the provisioningState property: The provisioning state, which only appears in the response. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -302,7 +312,7 @@ public String provisioningState() { /** * Get the status property: The status of the hybrid machine agent. - * + * * @return the status value. */ public StatusTypes status() { @@ -311,7 +321,7 @@ public StatusTypes status() { /** * Get the lastStatusChange property: The time of the last status change. - * + * * @return the lastStatusChange value. */ public OffsetDateTime lastStatusChange() { @@ -320,7 +330,7 @@ public OffsetDateTime lastStatusChange() { /** * Get the errorDetails property: Details about the error state. - * + * * @return the errorDetails value. */ public List errorDetails() { @@ -329,7 +339,7 @@ public List errorDetails() { /** * Get the agentVersion property: The hybrid machine agent full version. - * + * * @return the agentVersion value. */ public String agentVersion() { @@ -338,20 +348,20 @@ public String agentVersion() { /** * Get the vmId property: Specifies the hybrid machine unique ID. - * + * * @return the vmId value. */ - public String vmId() { + public UUID vmId() { return this.innerProperties() == null ? null : this.innerProperties().vmId(); } /** * Set the vmId property: Specifies the hybrid machine unique ID. - * + * * @param vmId the vmId value to set. * @return the MachineInner object itself. */ - public MachineInner withVmId(String vmId) { + public MachineInner withVmId(UUID vmId) { if (this.innerProperties() == null) { this.innerProperties = new MachinePropertiesInner(); } @@ -361,7 +371,7 @@ public MachineInner withVmId(String vmId) { /** * Get the displayName property: Specifies the hybrid machine display name. - * + * * @return the displayName value. */ public String displayName() { @@ -370,7 +380,7 @@ public String displayName() { /** * Get the machineFqdn property: Specifies the hybrid machine FQDN. - * + * * @return the machineFqdn value. */ public String machineFqdn() { @@ -380,7 +390,7 @@ public String machineFqdn() { /** * Get the clientPublicKey property: Public Key that the client provides to be used during initial resource * onboarding. - * + * * @return the clientPublicKey value. */ public String clientPublicKey() { @@ -390,7 +400,7 @@ public String clientPublicKey() { /** * Set the clientPublicKey property: Public Key that the client provides to be used during initial resource * onboarding. - * + * * @param clientPublicKey the clientPublicKey value to set. * @return the MachineInner object itself. */ @@ -404,7 +414,7 @@ public MachineInner withClientPublicKey(String clientPublicKey) { /** * Get the osName property: The Operating System running on the hybrid machine. - * + * * @return the osName value. */ public String osName() { @@ -413,7 +423,7 @@ public String osName() { /** * Get the osVersion property: The version of Operating System running on the hybrid machine. - * + * * @return the osVersion value. */ public String osVersion() { @@ -422,7 +432,7 @@ public String osVersion() { /** * Get the osType property: The type of Operating System (windows/linux). - * + * * @return the osType value. */ public String osType() { @@ -431,7 +441,7 @@ public String osType() { /** * Set the osType property: The type of Operating System (windows/linux). - * + * * @param osType the osType value to set. * @return the MachineInner object itself. */ @@ -445,16 +455,16 @@ public MachineInner withOsType(String osType) { /** * Get the vmUuid property: Specifies the Arc Machine's unique SMBIOS ID. - * + * * @return the vmUuid value. */ - public String vmUuid() { + public UUID vmUuid() { return this.innerProperties() == null ? null : this.innerProperties().vmUuid(); } /** * Get the extensions property: Machine Extensions information (deprecated field). - * + * * @return the extensions value. */ public List extensions() { @@ -463,7 +473,7 @@ public List extensions() { /** * Set the extensions property: Machine Extensions information (deprecated field). - * + * * @param extensions the extensions value to set. * @return the MachineInner object itself. */ @@ -477,16 +487,25 @@ public MachineInner withExtensions(List extensions /** * Get the osSku property: Specifies the Operating System product SKU. - * + * * @return the osSku value. */ public String osSku() { return this.innerProperties() == null ? null : this.innerProperties().osSku(); } + /** + * Get the osEdition property: The edition of the Operating System. + * + * @return the osEdition value. + */ + public String osEdition() { + return this.innerProperties() == null ? null : this.innerProperties().osEdition(); + } + /** * Get the domainName property: Specifies the Windows domain name. - * + * * @return the domainName value. */ public String domainName() { @@ -495,7 +514,7 @@ public String domainName() { /** * Get the adFqdn property: Specifies the AD fully qualified display name. - * + * * @return the adFqdn value. */ public String adFqdn() { @@ -504,7 +523,7 @@ public String adFqdn() { /** * Get the dnsFqdn property: Specifies the DNS fully qualified display name. - * + * * @return the dnsFqdn value. */ public String dnsFqdn() { @@ -514,7 +533,7 @@ public String dnsFqdn() { /** * Get the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @return the privateLinkScopeResourceId value. */ public String privateLinkScopeResourceId() { @@ -524,7 +543,7 @@ public String privateLinkScopeResourceId() { /** * Set the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @param privateLinkScopeResourceId the privateLinkScopeResourceId value to set. * @return the MachineInner object itself. */ @@ -539,7 +558,7 @@ public MachineInner withPrivateLinkScopeResourceId(String privateLinkScopeResour /** * Get the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @return the parentClusterResourceId value. */ public String parentClusterResourceId() { @@ -549,7 +568,7 @@ public String parentClusterResourceId() { /** * Set the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @param parentClusterResourceId the parentClusterResourceId value to set. * @return the MachineInner object itself. */ @@ -563,7 +582,7 @@ public MachineInner withParentClusterResourceId(String parentClusterResourceId) /** * Get the mssqlDiscovered property: Specifies whether any MS SQL instance is discovered on the machine. - * + * * @return the mssqlDiscovered value. */ public String mssqlDiscovered() { @@ -572,7 +591,7 @@ public String mssqlDiscovered() { /** * Set the mssqlDiscovered property: Specifies whether any MS SQL instance is discovered on the machine. - * + * * @param mssqlDiscovered the mssqlDiscovered value to set. * @return the MachineInner object itself. */ @@ -586,7 +605,7 @@ public MachineInner withMssqlDiscovered(String mssqlDiscovered) { /** * Get the detectedProperties property: Detected properties from the machine. - * + * * @return the detectedProperties value. */ public Map detectedProperties() { @@ -595,7 +614,7 @@ public Map detectedProperties() { /** * Get the networkProfile property: Information about the network the machine is on. - * + * * @return the networkProfile value. */ public NetworkProfileInner networkProfile() { @@ -604,7 +623,7 @@ public NetworkProfileInner networkProfile() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInstallPatchesResultInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInstallPatchesResultInner.java index 3c078ae9f8fe..8448b8a2f653 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInstallPatchesResultInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineInstallPatchesResultInner.java @@ -14,12 +14,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** The result summary of an installation operation. */ +/** + * The result summary of an installation operation. + */ @Immutable public final class MachineInstallPatchesResultInner { /* - * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. - * At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings." + * The overall success or failure status of the operation. It remains "InProgress" until the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or "CompletedWithWarnings." */ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private PatchOperationStatus status; @@ -55,8 +56,7 @@ public final class MachineInstallPatchesResultInner { private Integer notSelectedPatchCount; /* - * The number of patches that were identified as meeting the installation criteria, but were not able to be - * installed. Typically this happens when maintenanceWindowExceeded == true. + * The number of patches that were identified as meeting the installation criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. */ @JsonProperty(value = "pendingPatchCount", access = JsonProperty.Access.WRITE_ONLY) private Integer pendingPatchCount; @@ -109,7 +109,9 @@ public final class MachineInstallPatchesResultInner { @JsonProperty(value = "errorDetails", access = JsonProperty.Access.WRITE_ONLY) private ManagementError errorDetails; - /** Creates an instance of MachineInstallPatchesResultInner class. */ + /** + * Creates an instance of MachineInstallPatchesResultInner class. + */ public MachineInstallPatchesResultInner() { } @@ -117,7 +119,7 @@ public MachineInstallPatchesResultInner() { * Get the status property: The overall success or failure status of the operation. It remains "InProgress" until * the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or * "CompletedWithWarnings.". - * + * * @return the status value. */ public PatchOperationStatus status() { @@ -126,7 +128,7 @@ public PatchOperationStatus status() { /** * Get the installationActivityId property: The activity ID of the operation that produced this result. - * + * * @return the installationActivityId value. */ public String installationActivityId() { @@ -135,7 +137,7 @@ public String installationActivityId() { /** * Get the rebootStatus property: The reboot state of the VM following completion of the operation. - * + * * @return the rebootStatus value. */ public VMGuestPatchRebootStatus rebootStatus() { @@ -145,7 +147,7 @@ public VMGuestPatchRebootStatus rebootStatus() { /** * Get the maintenanceWindowExceeded property: Whether the operation ran out of time before it completed all its * intended actions. - * + * * @return the maintenanceWindowExceeded value. */ public Boolean maintenanceWindowExceeded() { @@ -155,7 +157,7 @@ public Boolean maintenanceWindowExceeded() { /** * Get the excludedPatchCount property: The number of patches that were not installed due to the user blocking their * installation. - * + * * @return the excludedPatchCount value. */ public Integer excludedPatchCount() { @@ -165,7 +167,7 @@ public Integer excludedPatchCount() { /** * Get the notSelectedPatchCount property: The number of patches that were detected as available for install, but * did not meet the operation's criteria. - * + * * @return the notSelectedPatchCount value. */ public Integer notSelectedPatchCount() { @@ -175,7 +177,7 @@ public Integer notSelectedPatchCount() { /** * Get the pendingPatchCount property: The number of patches that were identified as meeting the installation * criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. - * + * * @return the pendingPatchCount value. */ public Integer pendingPatchCount() { @@ -184,7 +186,7 @@ public Integer pendingPatchCount() { /** * Get the installedPatchCount property: The number of patches successfully installed. - * + * * @return the installedPatchCount value. */ public Integer installedPatchCount() { @@ -194,7 +196,7 @@ public Integer installedPatchCount() { /** * Get the failedPatchCount property: The number of patches that could not be installed due to some issue. See * errors for details. - * + * * @return the failedPatchCount value. */ public Integer failedPatchCount() { @@ -203,7 +205,7 @@ public Integer failedPatchCount() { /** * Get the startDateTime property: The UTC timestamp when the operation began. - * + * * @return the startDateTime value. */ public OffsetDateTime startDateTime() { @@ -212,7 +214,7 @@ public OffsetDateTime startDateTime() { /** * Get the lastModifiedDateTime property: The UTC timestamp when the operation finished. - * + * * @return the lastModifiedDateTime value. */ public OffsetDateTime lastModifiedDateTime() { @@ -221,7 +223,7 @@ public OffsetDateTime lastModifiedDateTime() { /** * Get the startedBy property: Indicates if operation was triggered by user or by platform. - * + * * @return the startedBy value. */ public PatchOperationStartedBy startedBy() { @@ -230,7 +232,7 @@ public PatchOperationStartedBy startedBy() { /** * Get the patchServiceUsed property: Specifies the patch service used for the operation. - * + * * @return the patchServiceUsed value. */ public PatchServiceUsed patchServiceUsed() { @@ -239,7 +241,7 @@ public PatchServiceUsed patchServiceUsed() { /** * Get the osType property: The operating system type of the machine. - * + * * @return the osType value. */ public OsType osType() { @@ -249,7 +251,7 @@ public OsType osType() { /** * Get the errorDetails property: The errors that were encountered during execution of the operation. The details * array contains the list of them. - * + * * @return the errorDetails value. */ public ManagementError errorDetails() { @@ -258,7 +260,7 @@ public ManagementError errorDetails() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 8dd8509eca75..a3dcc580feb3 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 @@ -9,6 +9,7 @@ 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.LicenseProfileMachineInstanceView; import com.azure.resourcemanager.hybridcompute.models.LocationData; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceView; import com.azure.resourcemanager.hybridcompute.models.OSProfile; @@ -19,8 +20,11 @@ import java.time.OffsetDateTime; import java.util.List; import java.util.Map; +import java.util.UUID; -/** Describes the properties of a hybrid machine. */ +/** + * Describes the properties of a hybrid machine. + */ @Fluent public final class MachinePropertiesInner { /* @@ -60,10 +64,10 @@ public final class MachinePropertiesInner { private OSProfile osProfile; /* - * Specifies the ESU related properties for a machine. + * Specifies the License related properties for a machine. */ @JsonProperty(value = "licenseProfile") - private LicenseProfileMachineInstanceViewInner licenseProfile; + private LicenseProfileMachineInstanceView licenseProfile; /* * The provisioning state, which only appears in the response. @@ -99,7 +103,7 @@ public final class MachinePropertiesInner { * Specifies the hybrid machine unique ID. */ @JsonProperty(value = "vmId") - private String vmId; + private UUID vmId; /* * Specifies the hybrid machine display name. @@ -141,7 +145,7 @@ public final class MachinePropertiesInner { * Specifies the Arc Machine's unique SMBIOS ID */ @JsonProperty(value = "vmUuid", access = JsonProperty.Access.WRITE_ONLY) - private String vmUuid; + private UUID vmUuid; /* * Machine Extensions information (deprecated field) @@ -155,6 +159,12 @@ public final class MachinePropertiesInner { @JsonProperty(value = "osSku", access = JsonProperty.Access.WRITE_ONLY) private String osSku; + /* + * The edition of the Operating System. + */ + @JsonProperty(value = "osEdition", access = JsonProperty.Access.WRITE_ONLY) + private String osEdition; + /* * Specifies the Windows domain name. */ @@ -204,13 +214,15 @@ public final class MachinePropertiesInner { @JsonProperty(value = "networkProfile", access = JsonProperty.Access.WRITE_ONLY) private NetworkProfileInner networkProfile; - /** Creates an instance of MachinePropertiesInner class. */ + /** + * Creates an instance of MachinePropertiesInner class. + */ public MachinePropertiesInner() { } /** * Get the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @return the locationData value. */ public LocationData locationData() { @@ -219,7 +231,7 @@ public LocationData locationData() { /** * Set the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @param locationData the locationData value to set. * @return the MachinePropertiesInner object itself. */ @@ -231,7 +243,7 @@ public MachinePropertiesInner withLocationData(LocationData locationData) { /** * Get the agentConfiguration property: Configurable properties that the user can set locally via the azcmagent * config command, or remotely via ARM. - * + * * @return the agentConfiguration value. */ public AgentConfiguration agentConfiguration() { @@ -240,7 +252,7 @@ public AgentConfiguration agentConfiguration() { /** * Get the serviceStatuses property: Statuses of dependent services that are reported back to ARM. - * + * * @return the serviceStatuses value. */ public ServiceStatuses serviceStatuses() { @@ -249,7 +261,7 @@ public ServiceStatuses serviceStatuses() { /** * Set the serviceStatuses property: Statuses of dependent services that are reported back to ARM. - * + * * @param serviceStatuses the serviceStatuses value to set. * @return the MachinePropertiesInner object itself. */ @@ -260,7 +272,7 @@ public MachinePropertiesInner withServiceStatuses(ServiceStatuses serviceStatuse /** * Get the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @return the cloudMetadata value. */ public CloudMetadata cloudMetadata() { @@ -269,7 +281,7 @@ public CloudMetadata cloudMetadata() { /** * Set the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @param cloudMetadata the cloudMetadata value to set. * @return the MachinePropertiesInner object itself. */ @@ -280,7 +292,7 @@ public MachinePropertiesInner withCloudMetadata(CloudMetadata cloudMetadata) { /** * Get the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @return the agentUpgrade value. */ public AgentUpgrade agentUpgrade() { @@ -289,7 +301,7 @@ public AgentUpgrade agentUpgrade() { /** * Set the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @param agentUpgrade the agentUpgrade value to set. * @return the MachinePropertiesInner object itself. */ @@ -300,7 +312,7 @@ public MachinePropertiesInner withAgentUpgrade(AgentUpgrade agentUpgrade) { /** * Get the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @return the osProfile value. */ public OSProfile osProfile() { @@ -309,7 +321,7 @@ public OSProfile osProfile() { /** * Set the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @param osProfile the osProfile value to set. * @return the MachinePropertiesInner object itself. */ @@ -319,28 +331,28 @@ public MachinePropertiesInner withOsProfile(OSProfile osProfile) { } /** - * Get the licenseProfile property: Specifies the ESU related properties for a machine. - * + * Get the licenseProfile property: Specifies the License related properties for a machine. + * * @return the licenseProfile value. */ - public LicenseProfileMachineInstanceViewInner licenseProfile() { + public LicenseProfileMachineInstanceView licenseProfile() { return this.licenseProfile; } /** - * Set the licenseProfile property: Specifies the ESU related properties for a machine. - * + * Set the licenseProfile property: Specifies the License related properties for a machine. + * * @param licenseProfile the licenseProfile value to set. * @return the MachinePropertiesInner object itself. */ - public MachinePropertiesInner withLicenseProfile(LicenseProfileMachineInstanceViewInner licenseProfile) { + public MachinePropertiesInner withLicenseProfile(LicenseProfileMachineInstanceView licenseProfile) { this.licenseProfile = licenseProfile; return this; } /** * Get the provisioningState property: The provisioning state, which only appears in the response. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -349,7 +361,7 @@ public String provisioningState() { /** * Get the status property: The status of the hybrid machine agent. - * + * * @return the status value. */ public StatusTypes status() { @@ -358,7 +370,7 @@ public StatusTypes status() { /** * Get the lastStatusChange property: The time of the last status change. - * + * * @return the lastStatusChange value. */ public OffsetDateTime lastStatusChange() { @@ -367,7 +379,7 @@ public OffsetDateTime lastStatusChange() { /** * Get the errorDetails property: Details about the error state. - * + * * @return the errorDetails value. */ public List errorDetails() { @@ -376,7 +388,7 @@ public List errorDetails() { /** * Get the agentVersion property: The hybrid machine agent full version. - * + * * @return the agentVersion value. */ public String agentVersion() { @@ -385,27 +397,27 @@ public String agentVersion() { /** * Get the vmId property: Specifies the hybrid machine unique ID. - * + * * @return the vmId value. */ - public String vmId() { + public UUID vmId() { return this.vmId; } /** * Set the vmId property: Specifies the hybrid machine unique ID. - * + * * @param vmId the vmId value to set. * @return the MachinePropertiesInner object itself. */ - public MachinePropertiesInner withVmId(String vmId) { + public MachinePropertiesInner withVmId(UUID vmId) { this.vmId = vmId; return this; } /** * Get the displayName property: Specifies the hybrid machine display name. - * + * * @return the displayName value. */ public String displayName() { @@ -414,7 +426,7 @@ public String displayName() { /** * Get the machineFqdn property: Specifies the hybrid machine FQDN. - * + * * @return the machineFqdn value. */ public String machineFqdn() { @@ -424,7 +436,7 @@ public String machineFqdn() { /** * Get the clientPublicKey property: Public Key that the client provides to be used during initial resource * onboarding. - * + * * @return the clientPublicKey value. */ public String clientPublicKey() { @@ -434,7 +446,7 @@ public String clientPublicKey() { /** * Set the clientPublicKey property: Public Key that the client provides to be used during initial resource * onboarding. - * + * * @param clientPublicKey the clientPublicKey value to set. * @return the MachinePropertiesInner object itself. */ @@ -445,7 +457,7 @@ public MachinePropertiesInner withClientPublicKey(String clientPublicKey) { /** * Get the osName property: The Operating System running on the hybrid machine. - * + * * @return the osName value. */ public String osName() { @@ -454,7 +466,7 @@ public String osName() { /** * Get the osVersion property: The version of Operating System running on the hybrid machine. - * + * * @return the osVersion value. */ public String osVersion() { @@ -463,7 +475,7 @@ public String osVersion() { /** * Get the osType property: The type of Operating System (windows/linux). - * + * * @return the osType value. */ public String osType() { @@ -472,7 +484,7 @@ public String osType() { /** * Set the osType property: The type of Operating System (windows/linux). - * + * * @param osType the osType value to set. * @return the MachinePropertiesInner object itself. */ @@ -483,16 +495,16 @@ public MachinePropertiesInner withOsType(String osType) { /** * Get the vmUuid property: Specifies the Arc Machine's unique SMBIOS ID. - * + * * @return the vmUuid value. */ - public String vmUuid() { + public UUID vmUuid() { return this.vmUuid; } /** * Get the extensions property: Machine Extensions information (deprecated field). - * + * * @return the extensions value. */ public List extensions() { @@ -501,7 +513,7 @@ public List extensions() { /** * Set the extensions property: Machine Extensions information (deprecated field). - * + * * @param extensions the extensions value to set. * @return the MachinePropertiesInner object itself. */ @@ -512,16 +524,25 @@ public MachinePropertiesInner withExtensions(List /** * Get the osSku property: Specifies the Operating System product SKU. - * + * * @return the osSku value. */ public String osSku() { return this.osSku; } + /** + * Get the osEdition property: The edition of the Operating System. + * + * @return the osEdition value. + */ + public String osEdition() { + return this.osEdition; + } + /** * Get the domainName property: Specifies the Windows domain name. - * + * * @return the domainName value. */ public String domainName() { @@ -530,7 +551,7 @@ public String domainName() { /** * Get the adFqdn property: Specifies the AD fully qualified display name. - * + * * @return the adFqdn value. */ public String adFqdn() { @@ -539,7 +560,7 @@ public String adFqdn() { /** * Get the dnsFqdn property: Specifies the DNS fully qualified display name. - * + * * @return the dnsFqdn value. */ public String dnsFqdn() { @@ -549,7 +570,7 @@ public String dnsFqdn() { /** * Get the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @return the privateLinkScopeResourceId value. */ public String privateLinkScopeResourceId() { @@ -559,7 +580,7 @@ public String privateLinkScopeResourceId() { /** * Set the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @param privateLinkScopeResourceId the privateLinkScopeResourceId value to set. * @return the MachinePropertiesInner object itself. */ @@ -571,7 +592,7 @@ public MachinePropertiesInner withPrivateLinkScopeResourceId(String privateLinkS /** * Get the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @return the parentClusterResourceId value. */ public String parentClusterResourceId() { @@ -581,7 +602,7 @@ public String parentClusterResourceId() { /** * Set the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @param parentClusterResourceId the parentClusterResourceId value to set. * @return the MachinePropertiesInner object itself. */ @@ -592,7 +613,7 @@ public MachinePropertiesInner withParentClusterResourceId(String parentClusterRe /** * Get the mssqlDiscovered property: Specifies whether any MS SQL instance is discovered on the machine. - * + * * @return the mssqlDiscovered value. */ public String mssqlDiscovered() { @@ -601,7 +622,7 @@ public String mssqlDiscovered() { /** * Set the mssqlDiscovered property: Specifies whether any MS SQL instance is discovered on the machine. - * + * * @param mssqlDiscovered the mssqlDiscovered value to set. * @return the MachinePropertiesInner object itself. */ @@ -612,7 +633,7 @@ public MachinePropertiesInner withMssqlDiscovered(String mssqlDiscovered) { /** * Get the detectedProperties property: Detected properties from the machine. - * + * * @return the detectedProperties value. */ public Map detectedProperties() { @@ -621,7 +642,7 @@ public Map detectedProperties() { /** * Get the networkProfile property: Information about the network the machine is on. - * + * * @return the networkProfile value. */ public NetworkProfileInner networkProfile() { @@ -630,7 +651,7 @@ public NetworkProfileInner networkProfile() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandInner.java new file mode 100644 index 000000000000..7a8c8386907f --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandInner.java @@ -0,0 +1,386 @@ +// 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.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 com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Describes a Run Command. + */ +@Fluent +public final class MachineRunCommandInner extends Resource { + /* + * Describes Run Command Properties + */ + @JsonProperty(value = "properties") + private MachineRunCommandProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of MachineRunCommandInner class. + */ + public MachineRunCommandInner() { + } + + /** + * Get the innerProperties property: Describes Run Command Properties. + * + * @return the innerProperties value. + */ + private MachineRunCommandProperties 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; + } + + /** + * {@inheritDoc} + */ + @Override + public MachineRunCommandInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public MachineRunCommandInner withTags(Map 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(); + } + } +} 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 000000000000..ecff7a9fad65 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineRunCommandProperties.java @@ -0,0 +1,397 @@ +// 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.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 com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Describes the properties of a run command. + */ +@Fluent +public final class MachineRunCommandProperties { + /* + * The source of the run command script. + */ + @JsonProperty(value = "source") + private MachineRunCommandScriptSource source; + + /* + * The parameters used by the script. + */ + @JsonProperty(value = "parameters") + private List parameters; + + /* + * The parameters used by the script. + */ + @JsonProperty(value = "protectedParameters") + private List protectedParameters; + + /* + * Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. + */ + @JsonProperty(value = "asyncExecution") + private Boolean asyncExecution; + + /* + * Specifies the user account on the machine when executing the run command. + */ + @JsonProperty(value = "runAsUser") + private String runAsUser; + + /* + * Specifies the user account password on the machine when executing the run command. + */ + @JsonProperty(value = "runAsPassword") + private String runAsPassword; + + /* + * The timeout in seconds to execute the run command. + */ + @JsonProperty(value = "timeoutInSeconds") + 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. + */ + @JsonProperty(value = "outputBlobUri") + 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. + */ + @JsonProperty(value = "errorBlobUri") + 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 + */ + @JsonProperty(value = "outputBlobManagedIdentity") + 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 + */ + @JsonProperty(value = "errorBlobManagedIdentity") + private RunCommandManagedIdentity errorBlobManagedIdentity; + + /* + * The provisioning state, which only appears in the response. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The machine run command instance view. + */ + @JsonProperty(value = "instanceView", access = JsonProperty.Access.WRITE_ONLY) + 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(); + } + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineUpdateProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineUpdateProperties.java index 4ddd5a76ca2b..b6e3e5511827 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineUpdateProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/MachineUpdateProperties.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.hybridcompute.models.OSProfile; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the ARM updatable properties of a hybrid machine. */ +/** + * Describes the ARM updatable properties of a hybrid machine. + */ @Fluent public final class MachineUpdateProperties { /* @@ -50,13 +52,15 @@ public final class MachineUpdateProperties { @JsonProperty(value = "privateLinkScopeResourceId") private String privateLinkScopeResourceId; - /** Creates an instance of MachineUpdateProperties class. */ + /** + * Creates an instance of MachineUpdateProperties class. + */ public MachineUpdateProperties() { } /** * Get the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @return the locationData value. */ public LocationData locationData() { @@ -65,7 +69,7 @@ public LocationData locationData() { /** * Set the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @param locationData the locationData value to set. * @return the MachineUpdateProperties object itself. */ @@ -76,7 +80,7 @@ public MachineUpdateProperties withLocationData(LocationData locationData) { /** * Get the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @return the osProfile value. */ public OSProfile osProfile() { @@ -85,7 +89,7 @@ public OSProfile osProfile() { /** * Set the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @param osProfile the osProfile value to set. * @return the MachineUpdateProperties object itself. */ @@ -96,7 +100,7 @@ public MachineUpdateProperties withOsProfile(OSProfile osProfile) { /** * Get the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @return the cloudMetadata value. */ public CloudMetadata cloudMetadata() { @@ -105,7 +109,7 @@ public CloudMetadata cloudMetadata() { /** * Set the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @param cloudMetadata the cloudMetadata value to set. * @return the MachineUpdateProperties object itself. */ @@ -116,7 +120,7 @@ public MachineUpdateProperties withCloudMetadata(CloudMetadata cloudMetadata) { /** * Get the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @return the agentUpgrade value. */ public AgentUpgrade agentUpgrade() { @@ -125,7 +129,7 @@ public AgentUpgrade agentUpgrade() { /** * Set the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @param agentUpgrade the agentUpgrade value to set. * @return the MachineUpdateProperties object itself. */ @@ -137,7 +141,7 @@ public MachineUpdateProperties withAgentUpgrade(AgentUpgrade agentUpgrade) { /** * Get the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @return the parentClusterResourceId value. */ public String parentClusterResourceId() { @@ -147,7 +151,7 @@ public String parentClusterResourceId() { /** * Set the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @param parentClusterResourceId the parentClusterResourceId value to set. * @return the MachineUpdateProperties object itself. */ @@ -159,7 +163,7 @@ public MachineUpdateProperties withParentClusterResourceId(String parentClusterR /** * Get the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @return the privateLinkScopeResourceId value. */ public String privateLinkScopeResourceId() { @@ -169,7 +173,7 @@ public String privateLinkScopeResourceId() { /** * Set the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @param privateLinkScopeResourceId the privateLinkScopeResourceId value to set. * @return the MachineUpdateProperties object itself. */ @@ -180,7 +184,7 @@ public MachineUpdateProperties withPrivateLinkScopeResourceId(String privateLink /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkProfileInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkProfileInner.java index 41cdc8378ef0..45835ed31a3e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkProfileInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/NetworkProfileInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the network information on this machine. */ +/** + * Describes the network information on this machine. + */ @Fluent public final class NetworkProfileInner { /* @@ -18,13 +20,15 @@ public final class NetworkProfileInner { @JsonProperty(value = "networkInterfaces") private List networkInterfaces; - /** Creates an instance of NetworkProfileInner class. */ + /** + * Creates an instance of NetworkProfileInner class. + */ public NetworkProfileInner() { } /** * Get the networkInterfaces property: The list of network interfaces. - * + * * @return the networkInterfaces value. */ public List networkInterfaces() { @@ -33,7 +37,7 @@ public List networkInterfaces() { /** * Set the networkInterfaces property: The list of network interfaces. - * + * * @param networkInterfaces the networkInterfaces value to set. * @return the NetworkProfileInner object itself. */ @@ -44,7 +48,7 @@ public NetworkProfileInner withNetworkInterfaces(List networkI /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/OperationValueInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/OperationValueInner.java index 3db00f32a5f0..0d4d95307bfd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/OperationValueInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/OperationValueInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.hybridcompute.models.OperationValueDisplay; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the properties of a Compute Operation value. */ +/** + * Describes the properties of a Compute Operation value. + */ @Fluent public final class OperationValueInner { /* @@ -35,13 +37,15 @@ public final class OperationValueInner { @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; - /** Creates an instance of OperationValueInner class. */ + /** + * Creates an instance of OperationValueInner class. + */ public OperationValueInner() { } /** * Get the origin property: The origin of the compute operation. - * + * * @return the origin value. */ public String origin() { @@ -50,7 +54,7 @@ public String origin() { /** * Get the name property: The name of the compute operation. - * + * * @return the name value. */ public String name() { @@ -59,7 +63,7 @@ public String name() { /** * Get the display property: Display properties. - * + * * @return the display value. */ public OperationValueDisplay display() { @@ -68,7 +72,7 @@ public OperationValueDisplay display() { /** * Set the display property: Display properties. - * + * * @param display the display value to set. * @return the OperationValueInner object itself. */ @@ -79,7 +83,7 @@ public OperationValueInner withDisplay(OperationValueDisplay display) { /** * Get the isDataAction property: This property indicates if the operation is an action or a data action. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -88,7 +92,7 @@ public Boolean isDataAction() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PatchSettings.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PatchSettings.java index d92448aa83ca..c5d0b53aec3f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PatchSettings.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PatchSettings.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.hybridcompute.models.PatchModeTypes; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specifies the patch settings. */ +/** + * Specifies the patch settings. + */ @Fluent public final class PatchSettings { /* @@ -24,13 +26,15 @@ public final class PatchSettings { @JsonProperty(value = "patchMode") private PatchModeTypes patchMode; - /** Creates an instance of PatchSettings class. */ + /** + * Creates an instance of PatchSettings class. + */ public PatchSettings() { } /** * Get the assessmentMode property: Specifies the assessment mode. - * + * * @return the assessmentMode value. */ public AssessmentModeTypes assessmentMode() { @@ -39,7 +43,7 @@ public AssessmentModeTypes assessmentMode() { /** * Set the assessmentMode property: Specifies the assessment mode. - * + * * @param assessmentMode the assessmentMode value to set. * @return the PatchSettings object itself. */ @@ -50,7 +54,7 @@ public PatchSettings withAssessmentMode(AssessmentModeTypes assessmentMode) { /** * Get the patchMode property: Specifies the patch mode. - * + * * @return the patchMode value. */ public PatchModeTypes patchMode() { @@ -59,7 +63,7 @@ public PatchModeTypes patchMode() { /** * Set the patchMode property: Specifies the patch mode. - * + * * @param patchMode the patchMode value to set. * @return the PatchSettings object itself. */ @@ -70,7 +74,7 @@ public PatchSettings withPatchMode(PatchModeTypes patchMode) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateEndpointConnectionInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateEndpointConnectionInner.java index 26906cb0a4f5..52c9a78d1414 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateEndpointConnectionInner.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A private endpoint connection. */ +/** + * A private endpoint connection. + */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { /* @@ -25,13 +27,15 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of PrivateEndpointConnectionInner class. */ + /** + * Creates an instance of PrivateEndpointConnectionInner class. + */ public PrivateEndpointConnectionInner() { } /** * Get the properties property: Resource properties. - * + * * @return the properties value. */ public PrivateEndpointConnectionProperties properties() { @@ -40,7 +44,7 @@ public PrivateEndpointConnectionProperties properties() { /** * Set the properties property: Resource properties. - * + * * @param properties the properties value to set. * @return the PrivateEndpointConnectionInner object itself. */ @@ -51,7 +55,7 @@ public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionPr /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -60,7 +64,7 @@ public SystemData systemData() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkResourceInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkResourceInner.java index de347adac351..8f5381eec973 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkResourceInner.java @@ -10,7 +10,9 @@ import com.azure.resourcemanager.hybridcompute.models.PrivateLinkResourceProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A private link resource. */ +/** + * A private link resource. + */ @Fluent public final class PrivateLinkResourceInner extends ProxyResource { /* @@ -25,13 +27,15 @@ public final class PrivateLinkResourceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of PrivateLinkResourceInner class. */ + /** + * Creates an instance of PrivateLinkResourceInner class. + */ public PrivateLinkResourceInner() { } /** * Get the properties property: Resource properties. - * + * * @return the properties value. */ public PrivateLinkResourceProperties properties() { @@ -40,7 +44,7 @@ public PrivateLinkResourceProperties properties() { /** * Set the properties property: Resource properties. - * + * * @param properties the properties value to set. * @return the PrivateLinkResourceInner object itself. */ @@ -51,7 +55,7 @@ public PrivateLinkResourceInner withProperties(PrivateLinkResourceProperties pro /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -60,7 +64,7 @@ public SystemData systemData() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkScopeValidationDetailsInner.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkScopeValidationDetailsInner.java index 901f52dbb590..90fd97242523 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkScopeValidationDetailsInner.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/PrivateLinkScopeValidationDetailsInner.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The PrivateLinkScopeValidationDetails model. */ +/** + * The PrivateLinkScopeValidationDetails model. + */ @Fluent public final class PrivateLinkScopeValidationDetailsInner { /* @@ -20,8 +22,7 @@ public final class PrivateLinkScopeValidationDetailsInner { private String id; /* - * Indicates whether machines associated with the private link scope can also use public Azure Arc service - * endpoints. + * Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. */ @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccessType publicNetworkAccess; @@ -32,13 +33,15 @@ public final class PrivateLinkScopeValidationDetailsInner { @JsonProperty(value = "connectionDetails") private List connectionDetails; - /** Creates an instance of PrivateLinkScopeValidationDetailsInner class. */ + /** + * Creates an instance of PrivateLinkScopeValidationDetailsInner class. + */ public PrivateLinkScopeValidationDetailsInner() { } /** * Get the id property: Azure resource Id. - * + * * @return the id value. */ public String id() { @@ -48,7 +51,7 @@ public String id() { /** * Get the publicNetworkAccess property: Indicates whether machines associated with the private link scope can also * use public Azure Arc service endpoints. - * + * * @return the publicNetworkAccess value. */ public PublicNetworkAccessType publicNetworkAccess() { @@ -58,7 +61,7 @@ public PublicNetworkAccessType publicNetworkAccess() { /** * Set the publicNetworkAccess property: Indicates whether machines associated with the private link scope can also * use public Azure Arc service endpoints. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the PrivateLinkScopeValidationDetailsInner object itself. */ @@ -69,7 +72,7 @@ public PrivateLinkScopeValidationDetailsInner withPublicNetworkAccess(PublicNetw /** * Get the connectionDetails property: List of Private Endpoint Connection details. - * + * * @return the connectionDetails value. */ public List connectionDetails() { @@ -78,7 +81,7 @@ public List connectionDetails() { /** * Set the connectionDetails property: List of Private Endpoint Connection details. - * + * * @param connectionDetails the connectionDetails value to set. * @return the PrivateLinkScopeValidationDetailsInner object itself. */ @@ -89,7 +92,7 @@ public PrivateLinkScopeValidationDetailsInner withConnectionDetails(List productFeatures; + + /** + * Creates an instance of ProductProfileUpdateProperties class. + */ + public ProductProfileUpdateProperties() { + } + + /** + * Get the subscriptionStatus property: Indicates the subscription status of the product. + * + * @return the subscriptionStatus value. + */ + public LicenseProfileSubscriptionStatusUpdate subscriptionStatus() { + return this.subscriptionStatus; + } + + /** + * Set the subscriptionStatus property: Indicates the subscription status of the product. + * + * @param subscriptionStatus the subscriptionStatus value to set. + * @return the ProductProfileUpdateProperties object itself. + */ + public ProductProfileUpdateProperties + withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate subscriptionStatus) { + this.subscriptionStatus = subscriptionStatus; + return this; + } + + /** + * Get the productType property: Indicates the product type of the license. + * + * @return the productType value. + */ + public LicenseProfileProductType productType() { + return this.productType; + } + + /** + * Set the productType property: Indicates the product type of the license. + * + * @param productType the productType value to set. + * @return the ProductProfileUpdateProperties object itself. + */ + public ProductProfileUpdateProperties withProductType(LicenseProfileProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get the productFeatures property: The list of product feature updates. + * + * @return the productFeatures value. + */ + public List productFeatures() { + return this.productFeatures; + } + + /** + * Set the productFeatures property: The list of product feature updates. + * + * @param productFeatures the productFeatures value to set. + * @return the ProductProfileUpdateProperties object itself. + */ + public ProductProfileUpdateProperties withProductFeatures(List productFeatures) { + this.productFeatures = productFeatures; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (productFeatures() != null) { + productFeatures().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/package-info.java index fe3ee2f349a1..ab7dfad9a719 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for HybridComputeManagementClient. The Hybrid Compute Management Client. */ +/** + * Package containing the inner data models for HybridComputeManagementClient. + * The Hybrid Compute Management Client. + */ package com.azure.resourcemanager.hybridcompute.fluent.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/package-info.java index 78815434aed5..53a0fc869a14 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for HybridComputeManagementClient. The Hybrid Compute Management Client. */ +/** + * Package containing the service clients for HybridComputeManagementClient. + * The Hybrid Compute Management Client. + */ package com.azure.resourcemanager.hybridcompute.fluent; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionImpl.java deleted file mode 100644 index 3ba70efedbc4..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.implementation; - -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionInner; -import com.azure.resourcemanager.hybridcompute.models.AgentVersion; - -public final class AgentVersionImpl implements AgentVersion { - private AgentVersionInner innerObject; - - private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - - AgentVersionImpl( - AgentVersionInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String agentVersion() { - return this.innerModel().agentVersion(); - } - - public String downloadLink() { - return this.innerModel().downloadLink(); - } - - public String osType() { - return this.innerModel().osType(); - } - - public AgentVersionInner 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/AgentVersionsClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsClientImpl.java deleted file mode 100644 index b4d115310303..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsClientImpl.java +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.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.AgentVersionsClient; -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionInner; -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionsListInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in AgentVersionsClient. */ -public final class AgentVersionsClientImpl implements AgentVersionsClient { - /** The proxy service used to perform REST calls. */ - private final AgentVersionsService service; - - /** The service client containing this operation class. */ - private final HybridComputeManagementClientImpl client; - - /** - * Initializes an instance of AgentVersionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AgentVersionsClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy.create(AgentVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HybridComputeManagementClientAgentVersions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HybridComputeManagem") - public interface AgentVersionsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("osType") String osType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.HybridCompute/osType/{osType}/agentVersions/{version}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("osType") String osType, - @PathParam("version") String version, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets all Agent Versions along with the download link currently present. - * - * @param osType Defines the os type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Agent Versions along with the download link currently present along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String osType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (osType == null) { - return Mono.error(new IllegalArgumentException("Parameter osType is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.list(this.client.getEndpoint(), this.client.getApiVersion(), osType, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets all Agent Versions along with the download link currently present. - * - * @param osType Defines the os type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Agent Versions along with the download link currently present along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String osType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (osType == null) { - return Mono.error(new IllegalArgumentException("Parameter osType 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(), osType, accept, context); - } - - /** - * Gets all Agent Versions along with the download link currently present. - * - * @param osType Defines the os type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Agent Versions along with the download link currently present on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String osType) { - return listWithResponseAsync(osType).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets all Agent Versions along with the download link currently present. - * - * @param osType Defines the os type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Agent Versions along with the download link currently present along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String osType, Context context) { - return listWithResponseAsync(osType, context).block(); - } - - /** - * Gets all Agent Versions along with the download link currently present. - * - * @param osType Defines the os type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Agent Versions along with the download link currently present. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AgentVersionsListInner list(String osType) { - return listWithResponse(osType, Context.NONE).getValue(); - } - - /** - * Gets an Agent Version along with the download link currently present. - * - * @param osType Defines the os type. - * @param version Defines the agent version. To get latest, use latest or else a specific agent version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Agent Version along with the download link currently present along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String osType, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (osType == null) { - return Mono.error(new IllegalArgumentException("Parameter osType is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get(this.client.getEndpoint(), this.client.getApiVersion(), osType, version, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets an Agent Version along with the download link currently present. - * - * @param osType Defines the os type. - * @param version Defines the agent version. To get latest, use latest or else a specific agent version. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Agent Version along with the download link currently present along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String osType, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (osType == null) { - return Mono.error(new IllegalArgumentException("Parameter osType is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), osType, version, accept, context); - } - - /** - * Gets an Agent Version along with the download link currently present. - * - * @param osType Defines the os type. - * @param version Defines the agent version. To get latest, use latest or else a specific agent version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Agent Version along with the download link currently present on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String osType, String version) { - return getWithResponseAsync(osType, version).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets an Agent Version along with the download link currently present. - * - * @param osType Defines the os type. - * @param version Defines the agent version. To get latest, use latest or else a specific agent version. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Agent Version along with the download link currently present along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String osType, String version, Context context) { - return getWithResponseAsync(osType, version, context).block(); - } - - /** - * Gets an Agent Version along with the download link currently present. - * - * @param osType Defines the os type. - * @param version Defines the agent version. To get latest, use latest or else a specific agent version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Agent Version along with the download link currently present. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AgentVersionInner get(String osType, String version) { - return getWithResponse(osType, version, Context.NONE).getValue(); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsImpl.java deleted file mode 100644 index 170e3ac0a3bc..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.AgentVersionsClient; -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionInner; -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionsListInner; -import com.azure.resourcemanager.hybridcompute.models.AgentVersion; -import com.azure.resourcemanager.hybridcompute.models.AgentVersions; -import com.azure.resourcemanager.hybridcompute.models.AgentVersionsList; - -public final class AgentVersionsImpl implements AgentVersions { - private static final ClientLogger LOGGER = new ClientLogger(AgentVersionsImpl.class); - - private final AgentVersionsClient innerClient; - - private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - - public AgentVersionsImpl( - AgentVersionsClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse(String osType, Context context) { - Response inner = this.serviceClient().listWithResponse(osType, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new AgentVersionsListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public AgentVersionsList list(String osType) { - AgentVersionsListInner inner = this.serviceClient().list(osType); - if (inner != null) { - return new AgentVersionsListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String osType, String version, Context context) { - Response inner = this.serviceClient().getWithResponse(osType, version, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new AgentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public AgentVersion get(String osType, String version) { - AgentVersionInner inner = this.serviceClient().get(osType, version); - if (inner != null) { - return new AgentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - private AgentVersionsClient 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/implementation/AgentVersionsListImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsListImpl.java deleted file mode 100644 index 1b39845dd757..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/AgentVersionsListImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.implementation; - -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionInner; -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionsListInner; -import com.azure.resourcemanager.hybridcompute.models.AgentVersion; -import com.azure.resourcemanager.hybridcompute.models.AgentVersionsList; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class AgentVersionsListImpl implements AgentVersionsList { - private AgentVersionsListInner innerObject; - - private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - - AgentVersionsListImpl( - AgentVersionsListInner innerObject, - com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new AgentVersionImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public String nextLink() { - return this.innerModel().nextLink(); - } - - public AgentVersionsListInner 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/ExtensionMetadatasClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasClientImpl.java index 72dd3859cc55..5b907a477a93 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.hybridcompute.models.ExtensionValueListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ExtensionMetadatasClient. */ +/** + * An instance of this class provides access to all the operations defined in ExtensionMetadatasClient. + */ public final class ExtensionMetadatasClientImpl implements ExtensionMetadatasClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ExtensionMetadatasService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HybridComputeManagementClientImpl client; /** * Initializes an instance of ExtensionMetadatasClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ExtensionMetadatasClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy.create(ExtensionMetadatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ExtensionMetadatasService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -56,41 +62,29 @@ public final class ExtensionMetadatasClientImpl implements ExtensionMetadatasCli @Host("{$host}") @ServiceInterface(name = "HybridComputeManagem") public interface ExtensionMetadatasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions/{version}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @PathParam("publisher") String publisher, - @PathParam("extensionType") String extensionType, - @PathParam("version") String version, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("publisher") String publisher, + @PathParam("extensionType") String extensionType, @PathParam("version") String version, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/publishers/{publisher}/extensionTypes/{extensionType}/versions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @PathParam("publisher") String publisher, - @PathParam("extensionType") String extensionType, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, @PathParam("publisher") String publisher, + @PathParam("extensionType") String extensionType, @HeaderParam("Accept") String accept, Context context); } /** * Gets an Extension Metadata based on location, publisher, extensionType and version. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -99,22 +93,18 @@ Mono> list( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Extension Metadata based on location, publisher, extensionType and version along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String location, String publisher, String extensionType, String version) { + private Mono> getWithResponseAsync(String location, String publisher, + String extensionType, String version) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -130,25 +120,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - publisher, - extensionType, - version, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, publisher, extensionType, version, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets an Extension Metadata based on location, publisher, extensionType and version. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -158,22 +137,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Extension Metadata based on location, publisher, extensionType and version along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String location, String publisher, String extensionType, String version, Context context) { + private Mono> getWithResponseAsync(String location, String publisher, + String extensionType, String version, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -189,22 +164,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - publisher, - extensionType, - version, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + location, publisher, extensionType, version, accept, context); } /** * Gets an Extension Metadata based on location, publisher, extensionType and version. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -213,18 +179,18 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Extension Metadata based on location, publisher, extensionType and version on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String location, String publisher, String extensionType, String version) { + private Mono getAsync(String location, String publisher, String extensionType, + String version) { return getWithResponseAsync(location, publisher, extensionType, version) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets an Extension Metadata based on location, publisher, extensionType and version. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -233,18 +199,18 @@ private Mono getAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Extension Metadata based on location, publisher, extensionType and version along with {@link - * Response}. + * @return an Extension Metadata based on location, publisher, extensionType and version along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String location, String publisher, String extensionType, String version, Context context) { + public Response getWithResponse(String location, String publisher, String extensionType, + String version, Context context) { return getWithResponseAsync(location, publisher, extensionType, version, context).block(); } /** * Gets an Extension Metadata based on location, publisher, extensionType and version. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -261,7 +227,7 @@ public ExtensionValueInner get(String location, String publisher, String extensi /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -269,22 +235,18 @@ public ExtensionValueInner get(String location, String publisher, String extensi * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Extension versions based on location, publisher, extensionType along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String location, String publisher, String extensionType) { + private Mono> listSinglePageAsync(String location, String publisher, + String extensionType) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -297,28 +259,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - publisher, - extensionType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), location, publisher, extensionType, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -327,22 +277,18 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Extension versions based on location, publisher, extensionType along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String location, String publisher, String extensionType, Context context) { + private Mono> listSinglePageAsync(String location, String publisher, + String extensionType, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -356,32 +302,23 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - publisher, - extensionType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), location, + publisher, extensionType, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType as paginated response with {@link - * PagedFlux}. + * @return all Extension versions based on location, publisher, extensionType as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location, String publisher, String extensionType) { @@ -390,7 +327,7 @@ private PagedFlux listAsync(String location, String publish /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -398,26 +335,26 @@ private PagedFlux listAsync(String location, String publish * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType as paginated response with {@link - * PagedFlux}. + * @return all Extension versions based on location, publisher, extensionType as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String location, String publisher, String extensionType, Context context) { + private PagedFlux listAsync(String location, String publisher, String extensionType, + Context context) { return new PagedFlux<>(() -> listSinglePageAsync(location, publisher, extensionType, context)); } /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType as paginated response with {@link - * PagedIterable}. + * @return all Extension versions based on location, publisher, extensionType as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, String publisher, String extensionType) { @@ -426,7 +363,7 @@ public PagedIterable list(String location, String publisher /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -434,12 +371,12 @@ public PagedIterable list(String location, String publisher * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType as paginated response with {@link - * PagedIterable}. + * @return all Extension versions based on location, publisher, extensionType as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String location, String publisher, String extensionType, Context context) { + public PagedIterable list(String location, String publisher, String extensionType, + Context context) { return new PagedIterable<>(listAsync(location, publisher, extensionType, context)); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasImpl.java index bbcaeb86922d..1905e07ebe16 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionMetadatasImpl.java @@ -21,22 +21,18 @@ public final class ExtensionMetadatasImpl implements ExtensionMetadatas { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - public ExtensionMetadatasImpl( - ExtensionMetadatasClient innerClient, + public ExtensionMetadatasImpl(ExtensionMetadatasClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String location, String publisher, String extensionType, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(location, publisher, extensionType, version, context); + public Response getWithResponse(String location, String publisher, String extensionType, + String version, Context context) { + Response inner + = this.serviceClient().getWithResponse(location, publisher, extensionType, version, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ExtensionValueImpl(inner.getValue(), this.manager())); } else { return null; @@ -54,14 +50,14 @@ public ExtensionValue get(String location, String publisher, String extensionTyp public PagedIterable list(String location, String publisher, String extensionType) { PagedIterable inner = this.serviceClient().list(location, publisher, extensionType); - return Utils.mapPage(inner, inner1 -> new ExtensionValueImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionValueImpl(inner1, this.manager())); } - public PagedIterable list( - String location, String publisher, String extensionType, Context context) { - PagedIterable inner = - this.serviceClient().list(location, publisher, extensionType, context); - return Utils.mapPage(inner, inner1 -> new ExtensionValueImpl(inner1, this.manager())); + public PagedIterable list(String location, String publisher, String extensionType, + Context context) { + PagedIterable inner + = this.serviceClient().list(location, publisher, extensionType, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExtensionValueImpl(inner1, this.manager())); } private ExtensionMetadatasClient serviceClient() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueImpl.java index a39bbab312c2..05ff636d3908 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ExtensionValueImpl.java @@ -13,8 +13,8 @@ public final class ExtensionValueImpl implements ExtensionValue { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - ExtensionValueImpl( - ExtensionValueInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + ExtensionValueImpl(ExtensionValueInner innerObject, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientBuilder.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientBuilder.java index 8e5b40e2375c..77122d13605b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientBuilder.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the HybridComputeManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {HybridComputeManagementClientImpl.class}) +/** + * A builder for creating a new instance of the HybridComputeManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { HybridComputeManagementClientImpl.class }) public final class HybridComputeManagementClientBuilder { /* * The ID of the target subscription. @@ -24,7 +26,7 @@ public final class HybridComputeManagementClientBuilder { /** * Sets The ID of the target subscription. - * + * * @param subscriptionId the subscriptionId value. * @return the HybridComputeManagementClientBuilder. */ @@ -40,7 +42,7 @@ public HybridComputeManagementClientBuilder subscriptionId(String subscriptionId /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the HybridComputeManagementClientBuilder. */ @@ -56,7 +58,7 @@ public HybridComputeManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the HybridComputeManagementClientBuilder. */ @@ -72,7 +74,7 @@ public HybridComputeManagementClientBuilder environment(AzureEnvironment environ /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the HybridComputeManagementClientBuilder. */ @@ -88,7 +90,7 @@ public HybridComputeManagementClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the HybridComputeManagementClientBuilder. */ @@ -104,7 +106,7 @@ public HybridComputeManagementClientBuilder defaultPollInterval(Duration default /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the HybridComputeManagementClientBuilder. */ @@ -115,30 +117,22 @@ public HybridComputeManagementClientBuilder serializerAdapter(SerializerAdapter /** * Builds an instance of HybridComputeManagementClientImpl with the provided parameters. - * + * * @return an instance of HybridComputeManagementClientImpl. */ public HybridComputeManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - HybridComputeManagementClientImpl client = - new HybridComputeManagementClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + HybridComputeManagementClientImpl client = new HybridComputeManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputeManagementClientImpl.java index 46187e7c6ba0..8479d25b3a60 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hybridcompute.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -12,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -22,13 +23,10 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.hybridcompute.fluent.AgentVersionsClient; import com.azure.resourcemanager.hybridcompute.fluent.ExtensionMetadatasClient; import com.azure.resourcemanager.hybridcompute.fluent.HybridComputeManagementClient; -import com.azure.resourcemanager.hybridcompute.fluent.HybridIdentityMetadatasClient; -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.OperationsClient; @@ -45,231 +43,229 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the HybridComputeManagementClientImpl type. */ +/** + * Initializes a new instance of the HybridComputeManagementClientImpl type. + */ @ServiceClient(builder = HybridComputeManagementClientBuilder.class) public final class HybridComputeManagementClientImpl implements HybridComputeManagementClient { - /** The ID of the target subscription. */ + /** + * The ID of the target subscription. + */ private final String subscriptionId; /** * Gets The ID of the target subscription. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The LicensesClient object to access its operations. */ - private final LicensesClient licenses; - /** - * Gets the LicensesClient object to access its operations. - * - * @return the LicensesClient object. + * The MachinesClient object to access its operations. */ - public LicensesClient getLicenses() { - return this.licenses; - } - - /** The MachinesClient object to access its operations. */ private final MachinesClient machines; /** * Gets the MachinesClient object to access its operations. - * + * * @return the MachinesClient object. */ public MachinesClient getMachines() { return this.machines; } - /** The LicenseProfilesClient object to access its operations. */ - private final LicenseProfilesClient licenseProfiles; - /** - * Gets the LicenseProfilesClient object to access its operations. - * - * @return the LicenseProfilesClient object. + * The MachineExtensionsClient object to access its operations. */ - public LicenseProfilesClient getLicenseProfiles() { - return this.licenseProfiles; - } - - /** The MachineExtensionsClient object to access its operations. */ private final MachineExtensionsClient machineExtensions; /** * Gets the MachineExtensionsClient object to access its operations. - * + * * @return the MachineExtensionsClient object. */ public MachineExtensionsClient getMachineExtensions() { return this.machineExtensions; } - /** The ResourceProvidersClient object to access its operations. */ + /** + * The ResourceProvidersClient object to access its operations. + */ private final ResourceProvidersClient resourceProviders; /** * Gets the ResourceProvidersClient object to access its operations. - * + * * @return the ResourceProvidersClient object. */ public ResourceProvidersClient getResourceProviders() { return this.resourceProviders; } - /** The ExtensionMetadatasClient object to access its operations. */ + /** + * The ExtensionMetadatasClient object to access its operations. + */ private final ExtensionMetadatasClient extensionMetadatas; /** * Gets the ExtensionMetadatasClient object to access its operations. - * + * * @return the ExtensionMetadatasClient object. */ public ExtensionMetadatasClient getExtensionMetadatas() { return this.extensionMetadatas; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The NetworkProfilesClient object to access its operations. */ + /** + * The NetworkProfilesClient object to access its operations. + */ private final NetworkProfilesClient networkProfiles; /** * Gets the NetworkProfilesClient object to access its operations. - * + * * @return the NetworkProfilesClient object. */ public NetworkProfilesClient getNetworkProfiles() { return this.networkProfiles; } - /** The HybridIdentityMetadatasClient object to access its operations. */ - private final HybridIdentityMetadatasClient hybridIdentityMetadatas; - /** - * Gets the HybridIdentityMetadatasClient object to access its operations. - * - * @return the HybridIdentityMetadatasClient object. + * The MachineRunCommandsClient object to access its operations. */ - public HybridIdentityMetadatasClient getHybridIdentityMetadatas() { - return this.hybridIdentityMetadatas; - } - - /** The AgentVersionsClient object to access its operations. */ - private final AgentVersionsClient agentVersions; + private final MachineRunCommandsClient machineRunCommands; /** - * Gets the AgentVersionsClient object to access its operations. - * - * @return the AgentVersionsClient object. + * Gets the MachineRunCommandsClient object to access its operations. + * + * @return the MachineRunCommandsClient object. */ - public AgentVersionsClient getAgentVersions() { - return this.agentVersions; + public MachineRunCommandsClient getMachineRunCommands() { + return this.machineRunCommands; } - /** The PrivateLinkScopesClient object to access its operations. */ + /** + * The PrivateLinkScopesClient object to access its operations. + */ private final PrivateLinkScopesClient privateLinkScopes; /** * Gets the PrivateLinkScopesClient object to access its operations. - * + * * @return the PrivateLinkScopesClient object. */ public PrivateLinkScopesClient getPrivateLinkScopes() { return this.privateLinkScopes; } - /** The PrivateLinkResourcesClient object to access its operations. */ + /** + * The PrivateLinkResourcesClient object to access its operations. + */ private final PrivateLinkResourcesClient privateLinkResources; /** * Gets the PrivateLinkResourcesClient object to access its operations. - * + * * @return the PrivateLinkResourcesClient object. */ public PrivateLinkResourcesClient getPrivateLinkResources() { return this.privateLinkResources; } - /** The PrivateEndpointConnectionsClient object to access its operations. */ + /** + * The PrivateEndpointConnectionsClient object to access its operations. + */ private final PrivateEndpointConnectionsClient privateEndpointConnections; /** * Gets the PrivateEndpointConnectionsClient object to access its operations. - * + * * @return the PrivateEndpointConnectionsClient object. */ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { @@ -278,7 +274,7 @@ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { /** * Initializes an instance of HybridComputeManagementClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -286,29 +282,21 @@ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ - HybridComputeManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + HybridComputeManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-06-20-preview"; - this.licenses = new LicensesClientImpl(this); + this.apiVersion = "2023-10-03-preview"; this.machines = new MachinesClientImpl(this); - this.licenseProfiles = new LicenseProfilesClientImpl(this); this.machineExtensions = new MachineExtensionsClientImpl(this); this.resourceProviders = new ResourceProvidersClientImpl(this); this.extensionMetadatas = new ExtensionMetadatasClientImpl(this); this.operations = new OperationsClientImpl(this); this.networkProfiles = new NetworkProfilesClientImpl(this); - this.hybridIdentityMetadatas = new HybridIdentityMetadatasClientImpl(this); - this.agentVersions = new AgentVersionsClientImpl(this); + this.machineRunCommands = new MachineRunCommandsClientImpl(this); this.privateLinkScopes = new PrivateLinkScopesClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); @@ -316,7 +304,7 @@ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -325,7 +313,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -335,7 +323,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -345,26 +333,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -377,19 +354,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } @@ -430,7 +404,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputePrivateLinkScopeImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputePrivateLinkScopeImpl.java index 7f44980ec651..eb16f4936d87 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputePrivateLinkScopeImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridComputePrivateLinkScopeImpl.java @@ -14,10 +14,8 @@ import java.util.Collections; import java.util.Map; -public final class HybridComputePrivateLinkScopeImpl - implements HybridComputePrivateLinkScope, - HybridComputePrivateLinkScope.Definition, - HybridComputePrivateLinkScope.Update { +public final class HybridComputePrivateLinkScopeImpl implements HybridComputePrivateLinkScope, + HybridComputePrivateLinkScope.Definition, HybridComputePrivateLinkScope.Update { private HybridComputePrivateLinkScopeInner innerObject; private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; @@ -87,27 +85,23 @@ public HybridComputePrivateLinkScopeImpl withExistingResourceGroup(String resour } public HybridComputePrivateLinkScope create() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateLinkScopes() - .createOrUpdateWithResponse(resourceGroupName, scopeName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateLinkScopes() + .createOrUpdateWithResponse(resourceGroupName, scopeName, this.innerModel(), Context.NONE) + .getValue(); return this; } public HybridComputePrivateLinkScope create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateLinkScopes() - .createOrUpdateWithResponse(resourceGroupName, scopeName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateLinkScopes() + .createOrUpdateWithResponse(resourceGroupName, scopeName, this.innerModel(), context) + .getValue(); return this; } - HybridComputePrivateLinkScopeImpl( - String name, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + HybridComputePrivateLinkScopeImpl(String name, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = new HybridComputePrivateLinkScopeInner(); this.serviceManager = serviceManager; this.scopeName = name; @@ -119,51 +113,42 @@ public HybridComputePrivateLinkScopeImpl update() { } public HybridComputePrivateLinkScope apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateLinkScopes() - .updateTagsWithResponse(resourceGroupName, scopeName, updatePrivateLinkScopeTags, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateLinkScopes() + .updateTagsWithResponse(resourceGroupName, scopeName, updatePrivateLinkScopeTags, Context.NONE) + .getValue(); return this; } public HybridComputePrivateLinkScope apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateLinkScopes() - .updateTagsWithResponse(resourceGroupName, scopeName, updatePrivateLinkScopeTags, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateLinkScopes() + .updateTagsWithResponse(resourceGroupName, scopeName, updatePrivateLinkScopeTags, context) + .getValue(); return this; } - HybridComputePrivateLinkScopeImpl( - HybridComputePrivateLinkScopeInner innerObject, + HybridComputePrivateLinkScopeImpl(HybridComputePrivateLinkScopeInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.scopeName = Utils.getValueFromIdByName(innerObject.id(), "privateLinkScopes"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.scopeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateLinkScopes"); } public HybridComputePrivateLinkScope refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateLinkScopes() - .getByResourceGroupWithResponse(resourceGroupName, scopeName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateLinkScopes() + .getByResourceGroupWithResponse(resourceGroupName, scopeName, Context.NONE) + .getValue(); return this; } public HybridComputePrivateLinkScope refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateLinkScopes() - .getByResourceGroupWithResponse(resourceGroupName, scopeName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateLinkScopes() + .getByResourceGroupWithResponse(resourceGroupName, scopeName, context) + .getValue(); return this; } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadataImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadataImpl.java deleted file mode 100644 index 06257f8b1725..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadataImpl.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hybridcompute.fluent.models.HybridIdentityMetadataInner; -import com.azure.resourcemanager.hybridcompute.models.HybridIdentityMetadata; -import com.azure.resourcemanager.hybridcompute.models.Identity; - -public final class HybridIdentityMetadataImpl implements HybridIdentityMetadata { - private HybridIdentityMetadataInner innerObject; - - private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - - HybridIdentityMetadataImpl( - HybridIdentityMetadataInner 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 vmId() { - return this.innerModel().vmId(); - } - - public String publicKey() { - return this.innerModel().publicKey(); - } - - public Identity identity() { - return this.innerModel().identity(); - } - - public HybridIdentityMetadataInner 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/HybridIdentityMetadatasClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadatasClientImpl.java deleted file mode 100644 index 912f01bdd74a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadatasClientImpl.java +++ /dev/null @@ -1,531 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.hybridcompute.fluent.HybridIdentityMetadatasClient; -import com.azure.resourcemanager.hybridcompute.fluent.models.HybridIdentityMetadataInner; -import com.azure.resourcemanager.hybridcompute.models.HybridIdentityMetadataList; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in HybridIdentityMetadatasClient. */ -public final class HybridIdentityMetadatasClientImpl implements HybridIdentityMetadatasClient { - /** The proxy service used to perform REST calls. */ - private final HybridIdentityMetadatasService service; - - /** The service client containing this operation class. */ - private final HybridComputeManagementClientImpl client; - - /** - * Initializes an instance of HybridIdentityMetadatasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - HybridIdentityMetadatasClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy - .create(HybridIdentityMetadatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HybridComputeManagementClientHybridIdentityMetadatas to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HybridComputeManagem") - public interface HybridIdentityMetadatasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata/{metadataName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @PathParam("metadataName") String metadataName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/hybridIdentityMetadata") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByMachines( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByMachinesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param metadataName Name of the HybridIdentityMetadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String machineName, String metadataName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - metadataName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param metadataName Name of the HybridIdentityMetadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String machineName, String metadataName, 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 (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - if (metadataName == null) { - return Mono.error(new IllegalArgumentException("Parameter metadataName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - metadataName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param metadataName Name of the HybridIdentityMetadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String machineName, String metadataName) { - return getWithResponseAsync(resourceGroupName, machineName, metadataName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param metadataName Name of the HybridIdentityMetadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String machineName, String metadataName, Context context) { - return getWithResponseAsync(resourceGroupName, machineName, metadataName, context).block(); - } - - /** - * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param metadataName Name of the HybridIdentityMetadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public HybridIdentityMetadataInner get(String resourceGroupName, String machineName, String metadataName) { - return getWithResponse(resourceGroupName, machineName, metadataName, Context.NONE).getValue(); - } - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given 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 list of HybridIdentityMetadata along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByMachinesSinglePageAsync( - String resourceGroupName, String machineName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByMachines( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of HybridIdentityMetadata along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByMachinesSinglePageAsync( - String resourceGroupName, String machineName, 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 (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByMachines( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given 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 list of HybridIdentityMetadata as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByMachinesAsync(String resourceGroupName, String machineName) { - return new PagedFlux<>( - () -> listByMachinesSinglePageAsync(resourceGroupName, machineName), - nextLink -> listByMachinesNextSinglePageAsync(nextLink)); - } - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of HybridIdentityMetadata as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByMachinesAsync( - String resourceGroupName, String machineName, Context context) { - return new PagedFlux<>( - () -> listByMachinesSinglePageAsync(resourceGroupName, machineName, context), - nextLink -> listByMachinesNextSinglePageAsync(nextLink, context)); - } - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given 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 list of HybridIdentityMetadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByMachines(String resourceGroupName, String machineName) { - return new PagedIterable<>(listByMachinesAsync(resourceGroupName, machineName)); - } - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of HybridIdentityMetadata as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByMachines( - String resourceGroupName, String machineName, Context context) { - return new PagedIterable<>(listByMachinesAsync(resourceGroupName, machineName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of HybridIdentityMetadata along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByMachinesNextSinglePageAsync(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.listByMachinesNext(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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of HybridIdentityMetadata along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByMachinesNextSinglePageAsync( - 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 - .listByMachinesNext(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/HybridIdentityMetadatasImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadatasImpl.java deleted file mode 100644 index 8a63fea6a8fa..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/HybridIdentityMetadatasImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.HybridIdentityMetadatasClient; -import com.azure.resourcemanager.hybridcompute.fluent.models.HybridIdentityMetadataInner; -import com.azure.resourcemanager.hybridcompute.models.HybridIdentityMetadata; -import com.azure.resourcemanager.hybridcompute.models.HybridIdentityMetadatas; - -public final class HybridIdentityMetadatasImpl implements HybridIdentityMetadatas { - private static final ClientLogger LOGGER = new ClientLogger(HybridIdentityMetadatasImpl.class); - - private final HybridIdentityMetadatasClient innerClient; - - private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - - public HybridIdentityMetadatasImpl( - HybridIdentityMetadatasClient innerClient, - com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse( - String resourceGroupName, String machineName, String metadataName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, machineName, metadataName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new HybridIdentityMetadataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public HybridIdentityMetadata get(String resourceGroupName, String machineName, String metadataName) { - HybridIdentityMetadataInner inner = this.serviceClient().get(resourceGroupName, machineName, metadataName); - if (inner != null) { - return new HybridIdentityMetadataImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listByMachines(String resourceGroupName, String machineName) { - PagedIterable inner = - this.serviceClient().listByMachines(resourceGroupName, machineName); - return Utils.mapPage(inner, inner1 -> new HybridIdentityMetadataImpl(inner1, this.manager())); - } - - public PagedIterable listByMachines( - String resourceGroupName, String machineName, Context context) { - PagedIterable inner = - this.serviceClient().listByMachines(resourceGroupName, machineName, context); - return Utils.mapPage(inner, inner1 -> new HybridIdentityMetadataImpl(inner1, this.manager())); - } - - private HybridIdentityMetadatasClient 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/implementation/LicenseImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseImpl.java deleted file mode 100644 index 2777a4078291..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseImpl.java +++ /dev/null @@ -1,246 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import com.azure.resourcemanager.hybridcompute.models.LicenseUpdate; -import com.azure.resourcemanager.hybridcompute.models.ProvisioningState; -import java.util.Collections; -import java.util.Map; - -public final class LicenseImpl implements License, License.Definition, License.Update { - private LicenseInner 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 tenantId() { - return this.innerModel().tenantId(); - } - - public LicenseType licenseType() { - return this.innerModel().licenseType(); - } - - public LicenseDetails licenseDetails() { - return this.innerModel().licenseDetails(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public LicenseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String licenseName; - - private LicenseUpdate updateParameters; - - public LicenseImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public License create() { - this.innerObject = - serviceManager - .serviceClient() - .getLicenses() - .createOrUpdate(resourceGroupName, licenseName, this.innerModel(), Context.NONE); - return this; - } - - public License create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLicenses() - .createOrUpdate(resourceGroupName, licenseName, this.innerModel(), context); - return this; - } - - LicenseImpl(String name, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = new LicenseInner(); - this.serviceManager = serviceManager; - this.licenseName = name; - } - - public LicenseImpl update() { - this.updateParameters = new LicenseUpdate(); - return this; - } - - public License apply() { - this.innerObject = - serviceManager - .serviceClient() - .getLicenses() - .update(resourceGroupName, licenseName, updateParameters, Context.NONE); - return this; - } - - public License apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLicenses() - .update(resourceGroupName, licenseName, updateParameters, context); - return this; - } - - LicenseImpl(LicenseInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.licenseName = Utils.getValueFromIdByName(innerObject.id(), "licenses"); - } - - public License refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getLicenses() - .getByResourceGroupWithResponse(resourceGroupName, licenseName, Context.NONE) - .getValue(); - return this; - } - - public License refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLicenses() - .getByResourceGroupWithResponse(resourceGroupName, licenseName, context) - .getValue(); - return this; - } - - public LicenseImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public LicenseImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public LicenseImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public LicenseImpl withTenantId(String tenantId) { - this.innerModel().withTenantId(tenantId); - return this; - } - - public LicenseImpl withLicenseType(LicenseType licenseType) { - if (isInCreateMode()) { - this.innerModel().withLicenseType(licenseType); - return this; - } else { - this.updateParameters.withLicenseType(licenseType); - return this; - } - } - - public LicenseImpl withLicenseDetails(LicenseDetails licenseDetails) { - this.innerModel().withLicenseDetails(licenseDetails); - return this; - } - - public LicenseImpl withState(LicenseState state) { - this.updateParameters.withState(state); - return this; - } - - public LicenseImpl withTarget(LicenseTarget target) { - this.updateParameters.withTarget(target); - return this; - } - - public LicenseImpl withEdition(LicenseEdition edition) { - this.updateParameters.withEdition(edition); - return this; - } - - public LicenseImpl withType(LicenseCoreType type) { - this.updateParameters.withType(type); - return this; - } - - public LicenseImpl withProcessors(Integer processors) { - this.updateParameters.withProcessors(processors); - 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/LicenseProfileImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileImpl.java deleted file mode 100644 index 1e6d8c83034a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileImpl.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.LicenseProfileInner; -import com.azure.resourcemanager.hybridcompute.models.EsuEligibility; -import com.azure.resourcemanager.hybridcompute.models.EsuKey; -import com.azure.resourcemanager.hybridcompute.models.EsuKeyState; -import com.azure.resourcemanager.hybridcompute.models.EsuServerType; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfile; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileUpdate; -import com.azure.resourcemanager.hybridcompute.models.ProvisioningState; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class LicenseProfileImpl implements LicenseProfile, LicenseProfile.Definition, LicenseProfile.Update { - private LicenseProfileInner 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 assignedLicense() { - return this.innerModel().assignedLicense(); - } - - public EsuServerType serverType() { - return this.innerModel().serverType(); - } - - public EsuEligibility esuEligibility() { - return this.innerModel().esuEligibility(); - } - - public EsuKeyState esuKeyState() { - return this.innerModel().esuKeyState(); - } - - public String assignedLicenseImmutableId() { - return this.innerModel().assignedLicenseImmutableId(); - } - - public List esuKeys() { - List inner = this.innerModel().esuKeys(); - 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 LicenseProfileInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String machineName; - - private LicenseProfileUpdate updateParameters; - - public LicenseProfileImpl withExistingMachine(String resourceGroupName, String machineName) { - this.resourceGroupName = resourceGroupName; - this.machineName = machineName; - return this; - } - - public LicenseProfile create() { - this.innerObject = - serviceManager - .serviceClient() - .getLicenseProfiles() - .createOrUpdate(resourceGroupName, machineName, this.innerModel(), Context.NONE); - return this; - } - - public LicenseProfile create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLicenseProfiles() - .createOrUpdate(resourceGroupName, machineName, this.innerModel(), context); - return this; - } - - LicenseProfileImpl(com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = new LicenseProfileInner(); - this.serviceManager = serviceManager; - } - - public LicenseProfileImpl update() { - this.updateParameters = new LicenseProfileUpdate(); - return this; - } - - public LicenseProfile apply() { - this.innerObject = - serviceManager - .serviceClient() - .getLicenseProfiles() - .update(resourceGroupName, machineName, updateParameters, Context.NONE); - return this; - } - - public LicenseProfile apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLicenseProfiles() - .update(resourceGroupName, machineName, updateParameters, context); - return this; - } - - LicenseProfileImpl( - LicenseProfileInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.machineName = Utils.getValueFromIdByName(innerObject.id(), "machines"); - } - - public LicenseProfile refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getLicenseProfiles() - .getWithResponse(resourceGroupName, machineName, Context.NONE) - .getValue(); - return this; - } - - public LicenseProfile refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLicenseProfiles() - .getWithResponse(resourceGroupName, machineName, context) - .getValue(); - return this; - } - - public LicenseProfileImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public LicenseProfileImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public LicenseProfileImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public LicenseProfileImpl withAssignedLicense(String assignedLicense) { - if (isInCreateMode()) { - this.innerModel().withAssignedLicense(assignedLicense); - return this; - } else { - this.updateParameters.withAssignedLicense(assignedLicense); - 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/LicenseProfileMachineInstanceViewEsuPropertiesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewEsuPropertiesImpl.java deleted file mode 100644 index dcde12fc19c3..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewEsuPropertiesImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.implementation; - -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewEsuPropertiesInner; -import com.azure.resourcemanager.hybridcompute.models.EsuEligibility; -import com.azure.resourcemanager.hybridcompute.models.EsuKey; -import com.azure.resourcemanager.hybridcompute.models.EsuKeyState; -import com.azure.resourcemanager.hybridcompute.models.EsuServerType; -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseAssignmentState; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileMachineInstanceViewEsuProperties; -import java.util.Collections; -import java.util.List; - -public final class LicenseProfileMachineInstanceViewEsuPropertiesImpl - implements LicenseProfileMachineInstanceViewEsuProperties { - private LicenseProfileMachineInstanceViewEsuPropertiesInner innerObject; - - private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - - LicenseProfileMachineInstanceViewEsuPropertiesImpl( - LicenseProfileMachineInstanceViewEsuPropertiesInner innerObject, - com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String assignedLicenseImmutableId() { - return this.innerModel().assignedLicenseImmutableId(); - } - - public List esuKeys() { - List inner = this.innerModel().esuKeys(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EsuServerType serverType() { - return this.innerModel().serverType(); - } - - public EsuEligibility esuEligibility() { - return this.innerModel().esuEligibility(); - } - - public EsuKeyState esuKeyState() { - return this.innerModel().esuKeyState(); - } - - public License assignedLicense() { - LicenseInner inner = this.innerModel().assignedLicense(); - if (inner != null) { - return new LicenseImpl(inner, this.manager()); - } else { - return null; - } - } - - public LicenseAssignmentState licenseAssignmentState() { - return this.innerModel().licenseAssignmentState(); - } - - public LicenseProfileMachineInstanceViewEsuPropertiesInner 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/LicenseProfileMachineInstanceViewImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewImpl.java deleted file mode 100644 index ee5c6599952b..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfileMachineInstanceViewImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.implementation; - -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewEsuPropertiesInner; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileMachineInstanceView; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileMachineInstanceViewEsuProperties; - -public final class LicenseProfileMachineInstanceViewImpl implements LicenseProfileMachineInstanceView { - private LicenseProfileMachineInstanceViewInner innerObject; - - private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - - LicenseProfileMachineInstanceViewImpl( - LicenseProfileMachineInstanceViewInner innerObject, - com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public LicenseProfileMachineInstanceViewEsuProperties esuProfile() { - LicenseProfileMachineInstanceViewEsuPropertiesInner inner = this.innerModel().esuProfile(); - if (inner != null) { - return new LicenseProfileMachineInstanceViewEsuPropertiesImpl(inner, this.manager()); - } else { - return null; - } - } - - public LicenseProfileMachineInstanceViewInner 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/LicenseProfilesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesClientImpl.java deleted file mode 100644 index 467c893cb0cb..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesClientImpl.java +++ /dev/null @@ -1,1331 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.LicenseProfilesClient; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfileUpdate; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfilesListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in LicenseProfilesClient. */ -public final class LicenseProfilesClientImpl implements LicenseProfilesClient { - /** The proxy service used to perform REST calls. */ - private final LicenseProfilesService service; - - /** The service client containing this operation class. */ - private final HybridComputeManagementClientImpl client; - - /** - * Initializes an instance of LicenseProfilesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LicenseProfilesClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy.create(LicenseProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HybridComputeManagementClientLicenseProfiles to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HybridComputeManagem") - public interface LicenseProfilesService { - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @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("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, - @BodyParam("application/json") LicenseProfileInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, - @BodyParam("application/json") LicenseProfileUpdate parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles/{licenseProfileName}") - @ExpectedResponses({202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @PathParam("licenseProfileName") String licenseProfileName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/licenseProfiles") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{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 license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String machineName, LicenseProfileInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String licenseProfileName = "default"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - licenseProfileName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to create or update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String machineName, LicenseProfileInner 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 (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String licenseProfileName = "default"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - licenseProfileName, - parameters, - accept, - context); - } - - /** - * The operation to create or update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseProfileInner> beginCreateOrUpdateAsync( - String resourceGroupName, String machineName, LicenseProfileInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, machineName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LicenseProfileInner.class, - LicenseProfileInner.class, - this.client.getContext()); - } - - /** - * The operation to create or update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile 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 a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseProfileInner> beginCreateOrUpdateAsync( - String resourceGroupName, String machineName, LicenseProfileInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, machineName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LicenseProfileInner.class, LicenseProfileInner.class, context); - } - - /** - * The operation to create or update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseProfileInner> beginCreateOrUpdate( - String resourceGroupName, String machineName, LicenseProfileInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, machineName, parameters).getSyncPoller(); - } - - /** - * The operation to create or update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseProfileInner> beginCreateOrUpdate( - String resourceGroupName, String machineName, LicenseProfileInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, machineName, parameters, context).getSyncPoller(); - } - - /** - * The operation to create or update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String machineName, LicenseProfileInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, machineName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to create or update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String machineName, LicenseProfileInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, machineName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to create or update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseProfileInner createOrUpdate( - String resourceGroupName, String machineName, LicenseProfileInner parameters) { - return createOrUpdateAsync(resourceGroupName, machineName, parameters).block(); - } - - /** - * The operation to create or update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Create license profile operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseProfileInner createOrUpdate( - String resourceGroupName, String machineName, LicenseProfileInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, machineName, parameters, context).block(); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String licenseProfileName = "default"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - licenseProfileName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String machineName, LicenseProfileUpdate 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 (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String licenseProfileName = "default"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - licenseProfileName, - parameters, - accept, - context); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseProfileInner> beginUpdateAsync( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, machineName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LicenseProfileInner.class, - LicenseProfileInner.class, - this.client.getContext()); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile 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 a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseProfileInner> beginUpdateAsync( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, machineName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LicenseProfileInner.class, LicenseProfileInner.class, context); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseProfileInner> beginUpdate( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, machineName, parameters).getSyncPoller(); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseProfileInner> beginUpdate( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, machineName, parameters, context).getSyncPoller(); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters) { - return beginUpdateAsync(resourceGroupName, machineName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, machineName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseProfileInner update(String resourceGroupName, String machineName, LicenseProfileUpdate parameters) { - return updateAsync(resourceGroupName, machineName, parameters).block(); - } - - /** - * The operation to update a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param parameters Parameters supplied to the Update license profile operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseProfileInner update( - String resourceGroupName, String machineName, LicenseProfileUpdate parameters, Context context) { - return updateAsync(resourceGroupName, machineName, parameters, context).block(); - } - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String machineName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - final String licenseProfileName = "default"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - licenseProfileName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String machineName, 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 (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - final String licenseProfileName = "default"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - licenseProfileName, - accept, - context); - } - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String machineName) { - return getWithResponseAsync(resourceGroupName, machineName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String machineName, Context context) { - return getWithResponseAsync(resourceGroupName, machineName, context).block(); - } - - /** - * Retrieves information about the view of a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseProfileInner get(String resourceGroupName, String machineName) { - return getWithResponse(resourceGroupName, machineName, Context.NONE).getValue(); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String machineName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - final String licenseProfileName = "default"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - licenseProfileName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String machineName, 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 (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - final String licenseProfileName = "default"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - licenseProfileName, - accept, - context); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String machineName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, machineName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String machineName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, machineName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String machineName) { - return this.beginDeleteAsync(resourceGroupName, machineName).getSyncPoller(); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String machineName, Context context) { - return this.beginDeleteAsync(resourceGroupName, machineName, context).getSyncPoller(); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String machineName) { - return beginDeleteAsync(resourceGroupName, machineName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String machineName, Context context) { - return beginDeleteAsync(resourceGroupName, machineName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String machineName) { - deleteAsync(resourceGroupName, machineName).block(); - } - - /** - * The operation to delete a license profile. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String machineName, Context context) { - deleteAsync(resourceGroupName, machineName, context).block(); - } - - /** - * The operation to get all license profiles of a non-Azure machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List hybrid machine license profile operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String machineName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (machineName == null) { - return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - machineName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to get all license profiles of a non-Azure machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the 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 hybrid machine license profile operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String machineName, 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, - 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 license profiles of a non-Azure machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List hybrid machine license profile operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String machineName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, machineName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * The operation to get all license profiles of a non-Azure machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the 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 hybrid machine license profile operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String machineName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, machineName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * The operation to get all license profiles of a non-Azure machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List hybrid machine license profile operation response as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String machineName) { - return new PagedIterable<>(listAsync(resourceGroupName, machineName)); - } - - /** - * The operation to get all license profiles of a non-Azure machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the 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 hybrid machine license profile operation response as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String machineName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, machineName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List hybrid machine license profile operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List hybrid machine license profile operation response 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/LicenseProfilesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesImpl.java deleted file mode 100644 index 626a27ec223a..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicenseProfilesImpl.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.LicenseProfilesClient; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfile; -import com.azure.resourcemanager.hybridcompute.models.LicenseProfiles; - -public final class LicenseProfilesImpl implements LicenseProfiles { - private static final ClientLogger LOGGER = new ClientLogger(LicenseProfilesImpl.class); - - private final LicenseProfilesClient innerClient; - - private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - - public LicenseProfilesImpl( - LicenseProfilesClient innerClient, - com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String machineName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, machineName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new LicenseProfileImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public LicenseProfile get(String resourceGroupName, String machineName) { - LicenseProfileInner inner = this.serviceClient().get(resourceGroupName, machineName); - if (inner != null) { - return new LicenseProfileImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String machineName) { - this.serviceClient().delete(resourceGroupName, machineName); - } - - public void delete(String resourceGroupName, String machineName, Context context) { - this.serviceClient().delete(resourceGroupName, machineName, context); - } - - public PagedIterable list(String resourceGroupName, String machineName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, machineName); - return Utils.mapPage(inner, inner1 -> new LicenseProfileImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String machineName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, machineName, context); - return Utils.mapPage(inner, inner1 -> new LicenseProfileImpl(inner1, this.manager())); - } - - public LicenseProfile getById(String id) { - String resourceGroupName = Utils.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 = Utils.getValueFromIdByName(id, "machines"); - if (machineName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); - } - return this.getWithResponse(resourceGroupName, machineName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 = Utils.getValueFromIdByName(id, "machines"); - if (machineName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); - } - return this.getWithResponse(resourceGroupName, machineName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 = Utils.getValueFromIdByName(id, "machines"); - if (machineName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); - } - this.delete(resourceGroupName, machineName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 = Utils.getValueFromIdByName(id, "machines"); - if (machineName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); - } - this.delete(resourceGroupName, machineName, context); - } - - private LicenseProfilesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { - return this.serviceManager; - } - - public LicenseProfileImpl define() { - return new LicenseProfileImpl(this.manager()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesClientImpl.java deleted file mode 100644 index c050e879857b..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesClientImpl.java +++ /dev/null @@ -1,1754 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -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.LicensesClient; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseUpdate; -import com.azure.resourcemanager.hybridcompute.models.LicensesListResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in LicensesClient. */ -public final class LicensesClientImpl implements LicensesClient { - /** The proxy service used to perform REST calls. */ - private final LicensesService service; - - /** The service client containing this operation class. */ - private final HybridComputeManagementClientImpl client; - - /** - * Initializes an instance of LicensesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LicensesClientImpl(HybridComputeManagementClientImpl client) { - this.service = RestProxy.create(LicensesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HybridComputeManagementClientLicenses to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HybridComputeManagem") - public interface LicensesService { - @Headers({"Content-Type: application/json"}) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/validateLicense") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validateLicense( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") LicenseInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("licenseName") String licenseName, - @BodyParam("application/json") LicenseInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("licenseName") String licenseName, - @BodyParam("application/json") LicenseUpdate parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("licenseName") String licenseName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses/{licenseName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("licenseName") String licenseName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/licenses") - @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/licenses") - @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 validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateLicenseWithResponseAsync(LicenseInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .validateLicense( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateLicenseWithResponseAsync( - LicenseInner 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 (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 - .validateLicense( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context); - } - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseInner> beginValidateLicenseAsync(LicenseInner parameters) { - Mono>> mono = validateLicenseWithResponseAsync(parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LicenseInner.class, LicenseInner.class, this.client.getContext()); - } - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseInner> beginValidateLicenseAsync( - LicenseInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = validateLicenseWithResponseAsync(parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LicenseInner.class, LicenseInner.class, context); - } - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseInner> beginValidateLicense(LicenseInner parameters) { - return this.beginValidateLicenseAsync(parameters).getSyncPoller(); - } - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseInner> beginValidateLicense( - LicenseInner parameters, Context context) { - return this.beginValidateLicenseAsync(parameters, context).getSyncPoller(); - } - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateLicenseAsync(LicenseInner parameters) { - return beginValidateLicenseAsync(parameters).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateLicenseAsync(LicenseInner parameters, Context context) { - return beginValidateLicenseAsync(parameters, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner validateLicense(LicenseInner parameters) { - return validateLicenseAsync(parameters).block(); - } - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner validateLicense(LicenseInner parameters, Context context) { - return validateLicenseAsync(parameters, context).block(); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String licenseName, LicenseInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (licenseName == null) { - return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - licenseName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String licenseName, LicenseInner 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 (licenseName == null) { - return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - licenseName, - parameters, - accept, - context); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String licenseName, LicenseInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, licenseName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LicenseInner.class, LicenseInner.class, this.client.getContext()); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license 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 a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String licenseName, LicenseInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, licenseName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LicenseInner.class, LicenseInner.class, context); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseInner> beginCreateOrUpdate( - String resourceGroupName, String licenseName, LicenseInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, licenseName, parameters).getSyncPoller(); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseInner> beginCreateOrUpdate( - String resourceGroupName, String licenseName, LicenseInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, licenseName, parameters, context).getSyncPoller(); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String licenseName, LicenseInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, licenseName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String licenseName, LicenseInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, licenseName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner createOrUpdate(String resourceGroupName, String licenseName, LicenseInner parameters) { - return createOrUpdateAsync(resourceGroupName, licenseName, parameters).block(); - } - - /** - * The operation to create or update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Create license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner createOrUpdate( - String resourceGroupName, String licenseName, LicenseInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, licenseName, parameters, context).block(); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String licenseName, LicenseUpdate 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 (licenseName == null) { - return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - licenseName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String licenseName, LicenseUpdate 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 (licenseName == null) { - return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - licenseName, - parameters, - accept, - context); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseInner> beginUpdateAsync( - String resourceGroupName, String licenseName, LicenseUpdate parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, licenseName, parameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LicenseInner.class, LicenseInner.class, this.client.getContext()); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license 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 a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LicenseInner> beginUpdateAsync( - String resourceGroupName, String licenseName, LicenseUpdate parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, licenseName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LicenseInner.class, LicenseInner.class, context); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseInner> beginUpdate( - String resourceGroupName, String licenseName, LicenseUpdate parameters) { - return this.beginUpdateAsync(resourceGroupName, licenseName, parameters).getSyncPoller(); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LicenseInner> beginUpdate( - String resourceGroupName, String licenseName, LicenseUpdate parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, licenseName, parameters, context).getSyncPoller(); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String licenseName, LicenseUpdate parameters) { - return beginUpdateAsync(resourceGroupName, licenseName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String licenseName, LicenseUpdate parameters, Context context) { - return beginUpdateAsync(resourceGroupName, licenseName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner update(String resourceGroupName, String licenseName, LicenseUpdate parameters) { - return updateAsync(resourceGroupName, licenseName, parameters).block(); - } - - /** - * The operation to update a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param parameters Parameters supplied to the Update license operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner update( - String resourceGroupName, String licenseName, LicenseUpdate parameters, Context context) { - return updateAsync(resourceGroupName, licenseName, parameters, context).block(); - } - - /** - * Retrieves information about the view of a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String licenseName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (licenseName == null) { - return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - licenseName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Retrieves information about the view of a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String licenseName, 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 (licenseName == null) { - return Mono.error(new IllegalArgumentException("Parameter licenseName 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, - licenseName, - accept, - context); - } - - /** - * Retrieves information about the view of a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String licenseName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, licenseName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Retrieves information about the view of a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String licenseName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, licenseName, context).block(); - } - - /** - * Retrieves information about the view of a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LicenseInner getByResourceGroup(String resourceGroupName, String licenseName) { - return getByResourceGroupWithResponse(resourceGroupName, licenseName, Context.NONE).getValue(); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String licenseName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (licenseName == null) { - return Mono.error(new IllegalArgumentException("Parameter licenseName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - licenseName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String licenseName, 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 (licenseName == null) { - return Mono.error(new IllegalArgumentException("Parameter licenseName 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, - licenseName, - accept, - context); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String licenseName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, licenseName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String licenseName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, licenseName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String licenseName) { - return this.beginDeleteAsync(resourceGroupName, licenseName).getSyncPoller(); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String licenseName, Context context) { - return this.beginDeleteAsync(resourceGroupName, licenseName, context).getSyncPoller(); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String licenseName) { - return beginDeleteAsync(resourceGroupName, licenseName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String licenseName, Context context) { - return beginDeleteAsync(resourceGroupName, licenseName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String licenseName) { - deleteAsync(resourceGroupName, licenseName).block(); - } - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String licenseName, Context context) { - deleteAsync(resourceGroupName, licenseName, context).block(); - } - - /** - * The operation to get all licenses 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 licenses 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 licenses 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 licenses 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 licenses 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 licenses 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 licenses 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 licenses 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 licenses 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 licenses 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 licenses 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 licenses 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 - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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/LicensesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesImpl.java deleted file mode 100644 index 95c7d78f8e84..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/LicensesImpl.java +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.LicensesClient; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.Licenses; - -public final class LicensesImpl implements Licenses { - private static final ClientLogger LOGGER = new ClientLogger(LicensesImpl.class); - - private final LicensesClient innerClient; - - private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - - public LicensesImpl( - LicensesClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public License validateLicense(LicenseInner parameters) { - LicenseInner inner = this.serviceClient().validateLicense(parameters); - if (inner != null) { - return new LicenseImpl(inner, this.manager()); - } else { - return null; - } - } - - public License validateLicense(LicenseInner parameters, Context context) { - LicenseInner inner = this.serviceClient().validateLicense(parameters, context); - if (inner != null) { - return new LicenseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String licenseName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, licenseName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new LicenseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public License getByResourceGroup(String resourceGroupName, String licenseName) { - LicenseInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, licenseName); - if (inner != null) { - return new LicenseImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String licenseName) { - this.serviceClient().delete(resourceGroupName, licenseName); - } - - public void delete(String resourceGroupName, String licenseName, Context context) { - this.serviceClient().delete(resourceGroupName, licenseName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new LicenseImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new LicenseImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new LicenseImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new LicenseImpl(inner1, this.manager())); - } - - public License getById(String id) { - String resourceGroupName = Utils.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 licenseName = Utils.getValueFromIdByName(id, "licenses"); - if (licenseName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, licenseName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 licenseName = Utils.getValueFromIdByName(id, "licenses"); - if (licenseName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, licenseName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 licenseName = Utils.getValueFromIdByName(id, "licenses"); - if (licenseName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); - } - this.delete(resourceGroupName, licenseName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 licenseName = Utils.getValueFromIdByName(id, "licenses"); - if (licenseName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'licenses'.", id))); - } - this.delete(resourceGroupName, licenseName, context); - } - - private LicensesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.hybridcompute.HybridComputeManager manager() { - return this.serviceManager; - } - - public LicenseImpl define(String name) { - return new LicenseImpl(name, this.manager()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineAssessPatchesResultImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineAssessPatchesResultImpl.java index 53e7608b7913..ce6352ef8666 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineAssessPatchesResultImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineAssessPatchesResultImpl.java @@ -13,14 +13,14 @@ import com.azure.resourcemanager.hybridcompute.models.PatchOperationStatus; import com.azure.resourcemanager.hybridcompute.models.PatchServiceUsed; import java.time.OffsetDateTime; +import java.util.UUID; public final class MachineAssessPatchesResultImpl implements MachineAssessPatchesResult { private MachineAssessPatchesResultInner innerObject; private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - MachineAssessPatchesResultImpl( - MachineAssessPatchesResultInner innerObject, + MachineAssessPatchesResultImpl(MachineAssessPatchesResultInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -30,7 +30,7 @@ public PatchOperationStatus status() { return this.innerModel().status(); } - public String assessmentActivityId() { + public UUID assessmentActivityId() { return this.innerModel().assessmentActivityId(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionImpl.java index cb20c674fd65..e7636052bce6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionImpl.java @@ -88,20 +88,16 @@ public MachineExtensionImpl withExistingMachine(String resourceGroupName, String } public MachineExtension create() { - this.innerObject = - serviceManager - .serviceClient() - .getMachineExtensions() - .createOrUpdate(resourceGroupName, machineName, extensionName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getMachineExtensions() + .createOrUpdate(resourceGroupName, machineName, extensionName, this.innerModel(), Context.NONE); return this; } public MachineExtension create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMachineExtensions() - .createOrUpdate(resourceGroupName, machineName, extensionName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getMachineExtensions() + .createOrUpdate(resourceGroupName, machineName, extensionName, this.innerModel(), context); return this; } @@ -117,50 +113,41 @@ public MachineExtensionImpl update() { } public MachineExtension apply() { - this.innerObject = - serviceManager - .serviceClient() - .getMachineExtensions() - .update(resourceGroupName, machineName, extensionName, updateExtensionParameters, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getMachineExtensions() + .update(resourceGroupName, machineName, extensionName, updateExtensionParameters, Context.NONE); return this; } public MachineExtension apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMachineExtensions() - .update(resourceGroupName, machineName, extensionName, updateExtensionParameters, context); + this.innerObject = serviceManager.serviceClient() + .getMachineExtensions() + .update(resourceGroupName, machineName, extensionName, updateExtensionParameters, context); return this; } - MachineExtensionImpl( - MachineExtensionInner innerObject, + MachineExtensionImpl(MachineExtensionInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.machineName = Utils.getValueFromIdByName(innerObject.id(), "machines"); - this.extensionName = Utils.getValueFromIdByName(innerObject.id(), "extensions"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.machineName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "machines"); + this.extensionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "extensions"); } public MachineExtension refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getMachineExtensions() - .getWithResponse(resourceGroupName, machineName, extensionName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMachineExtensions() + .getWithResponse(resourceGroupName, machineName, extensionName, Context.NONE) + .getValue(); return this; } public MachineExtension refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMachineExtensions() - .getWithResponse(resourceGroupName, machineName, extensionName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMachineExtensions() + .getWithResponse(resourceGroupName, machineName, extensionName, context) + .getValue(); return 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 6571532cfcad..c30ca5792fdc 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 @@ -34,28 +34,34 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridcompute.fluent.MachineExtensionsClient; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner; -import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpdate; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionsListResult; +import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpdate; 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 MachineExtensionsClient. */ +/** + * An instance of this class provides access to all the operations defined in MachineExtensionsClient. + */ public final class MachineExtensionsClientImpl implements MachineExtensionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MachineExtensionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HybridComputeManagementClientImpl client; /** * Initializes an instance of MachineExtensionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MachineExtensionsClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy.create(MachineExtensionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(MachineExtensionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -66,97 +72,67 @@ public final class MachineExtensionsClientImpl implements MachineExtensionsClien @Host("{$host}") @ServiceInterface(name = "HybridComputeManagem") public interface MachineExtensionsService { - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, - @QueryParam("api-version") String apiVersion, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @BodyParam("application/json") MachineExtensionInner extensionParameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, - @QueryParam("api-version") String apiVersion, + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @BodyParam("application/json") MachineExtensionUpdate extensionParameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions/{extensionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @PathParam("extensionName") String extensionName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @PathParam("extensionName") String extensionName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/extensions") + @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); + 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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * The operation to create or update the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -167,13 +143,11 @@ Mono> listNext( * @return describes a Machine Extension along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String machineName, String extensionName, MachineExtensionInner extensionParameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -186,10 +160,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (extensionParameters == null) { return Mono @@ -199,25 +171,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - machineName, - extensionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - extensionParameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, machineName, + extensionName, this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. * @param extensionName The name of the machine extension. @@ -229,17 +191,11 @@ private Mono>> createOrUpdateWithResponseAsync( * @return describes a Machine Extension along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionInner extensionParameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String machineName, String extensionName, MachineExtensionInner extensionParameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -252,10 +208,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (extensionParameters == null) { return Mono @@ -265,22 +219,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - machineName, - extensionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - extensionParameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, accept, context); } /** * The operation to create or update the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -293,21 +238,16 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MachineExtensionInner> beginCreateOrUpdateAsync( String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, machineName, extensionName, extensionParameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MachineExtensionInner.class, - MachineExtensionInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, machineName, extensionName, extensionParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineExtensionInner.class, MachineExtensionInner.class, + this.client.getContext()); } /** * 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. * @param extensionName The name of the machine extension. @@ -320,24 +260,18 @@ private PollerFlux, MachineExtensionInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MachineExtensionInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionInner extensionParameters, + String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, machineName, extensionName, extensionParameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), MachineExtensionInner.class, MachineExtensionInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, machineName, + extensionName, extensionParameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineExtensionInner.class, MachineExtensionInner.class, context); } /** * The operation to create or update the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -350,14 +284,13 @@ private PollerFlux, MachineExtensionInner> beg @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MachineExtensionInner> beginCreateOrUpdate( String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters) .getSyncPoller(); } /** * 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. * @param extensionName The name of the machine extension. @@ -370,10 +303,7 @@ public SyncPoller, MachineExtensionInner> begi */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MachineExtensionInner> beginCreateOrUpdate( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionInner extensionParameters, + String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters, context) @@ -382,7 +312,7 @@ public SyncPoller, MachineExtensionInner> begi /** * The operation to create or update the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -393,16 +323,15 @@ public SyncPoller, MachineExtensionInner> begi * @return describes a Machine Extension on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters) { - return beginCreateOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String machineName, + String extensionName, MachineExtensionInner extensionParameters) { + return beginCreateOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * 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. * @param extensionName The name of the machine extension. @@ -414,12 +343,8 @@ private Mono createOrUpdateAsync( * @return describes a Machine Extension on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionInner extensionParameters, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, String machineName, + String extensionName, MachineExtensionInner extensionParameters, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters, context) .last() .flatMap(this.client::getLroFinalResultOrError); @@ -427,7 +352,7 @@ private Mono createOrUpdateAsync( /** * 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. * @param extensionName The name of the machine extension. @@ -438,14 +363,14 @@ private Mono createOrUpdateAsync( * @return describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MachineExtensionInner createOrUpdate( - String resourceGroupName, String machineName, String extensionName, MachineExtensionInner extensionParameters) { + public MachineExtensionInner createOrUpdate(String resourceGroupName, String machineName, String extensionName, + MachineExtensionInner extensionParameters) { return createOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters).block(); } /** * 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. * @param extensionName The name of the machine extension. @@ -457,18 +382,14 @@ public MachineExtensionInner createOrUpdate( * @return describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MachineExtensionInner createOrUpdate( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionInner extensionParameters, - Context context) { + public MachineExtensionInner createOrUpdate(String resourceGroupName, String machineName, String extensionName, + MachineExtensionInner extensionParameters, Context context) { return createOrUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters, context).block(); } /** * 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. * @param extensionName The name of the machine extension. @@ -479,16 +400,11 @@ public MachineExtensionInner createOrUpdate( * @return describes a Machine Extension along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionUpdate extensionParameters) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String machineName, + String extensionName, MachineExtensionUpdate extensionParameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -501,10 +417,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (extensionParameters == null) { return Mono @@ -515,24 +429,14 @@ private Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - machineName, - extensionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - extensionParameters, - accept, - context)) + context -> service.update(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. * @param extensionName The name of the machine extension. @@ -544,17 +448,11 @@ private Mono>> updateWithResponseAsync( * @return describes a Machine Extension along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionUpdate extensionParameters, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String machineName, + String extensionName, MachineExtensionUpdate extensionParameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -567,10 +465,8 @@ private Mono>> updateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (extensionParameters == null) { return Mono @@ -580,22 +476,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - machineName, - extensionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - extensionParameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), extensionParameters, accept, context); } /** * The operation to create or update the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -607,25 +494,18 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MachineExtensionInner> beginUpdateAsync( - String resourceGroupName, - String machineName, - String extensionName, + String resourceGroupName, String machineName, String extensionName, MachineExtensionUpdate extensionParameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, machineName, extensionName, extensionParameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MachineExtensionInner.class, - MachineExtensionInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, machineName, extensionName, extensionParameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineExtensionInner.class, MachineExtensionInner.class, + this.client.getContext()); } /** * 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. * @param extensionName The name of the machine extension. @@ -638,23 +518,18 @@ private PollerFlux, MachineExtensionInner> beg */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MachineExtensionInner> beginUpdateAsync( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionUpdate extensionParameters, + String resourceGroupName, String machineName, String extensionName, MachineExtensionUpdate extensionParameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, machineName, extensionName, extensionParameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), MachineExtensionInner.class, MachineExtensionInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, machineName, extensionName, extensionParameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineExtensionInner.class, MachineExtensionInner.class, context); } /** * The operation to create or update the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be created or updated. * @param extensionName The name of the machine extension. @@ -665,19 +540,15 @@ private PollerFlux, MachineExtensionInner> beg * @return the {@link SyncPoller} for polling of describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MachineExtensionInner> beginUpdate( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionUpdate extensionParameters) { - return this - .beginUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters) + public SyncPoller, MachineExtensionInner> beginUpdate(String resourceGroupName, + String machineName, String extensionName, MachineExtensionUpdate extensionParameters) { + return this.beginUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters) .getSyncPoller(); } /** * 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. * @param extensionName The name of the machine extension. @@ -689,20 +560,15 @@ public SyncPoller, MachineExtensionInner> begi * @return the {@link SyncPoller} for polling of describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MachineExtensionInner> beginUpdate( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionUpdate extensionParameters, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters, context) + public SyncPoller, MachineExtensionInner> beginUpdate(String resourceGroupName, + String machineName, String extensionName, MachineExtensionUpdate extensionParameters, Context context) { + return this.beginUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters, context) .getSyncPoller(); } /** * 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. * @param extensionName The name of the machine extension. @@ -713,19 +579,15 @@ public SyncPoller, MachineExtensionInner> begi * @return describes a Machine Extension on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String machineName, - String extensionName, + private Mono updateAsync(String resourceGroupName, String machineName, String extensionName, MachineExtensionUpdate extensionParameters) { - return beginUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters) - .last() + return beginUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * 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. * @param extensionName The name of the machine extension. @@ -737,20 +599,15 @@ private Mono updateAsync( * @return describes a Machine Extension on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionUpdate extensionParameters, - Context context) { - return beginUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters, context) - .last() + private Mono updateAsync(String resourceGroupName, String machineName, String extensionName, + MachineExtensionUpdate extensionParameters, Context context) { + return beginUpdateAsync(resourceGroupName, machineName, extensionName, extensionParameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * 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. * @param extensionName The name of the machine extension. @@ -761,17 +618,14 @@ private Mono updateAsync( * @return describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MachineExtensionInner update( - String resourceGroupName, - String machineName, - String extensionName, + public MachineExtensionInner update(String resourceGroupName, String machineName, String extensionName, MachineExtensionUpdate extensionParameters) { return updateAsync(resourceGroupName, machineName, extensionName, extensionParameters).block(); } /** * 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. * @param extensionName The name of the machine extension. @@ -783,18 +637,14 @@ public MachineExtensionInner update( * @return describes a Machine Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MachineExtensionInner update( - String resourceGroupName, - String machineName, - String extensionName, - MachineExtensionUpdate extensionParameters, - Context context) { + public MachineExtensionInner update(String resourceGroupName, String machineName, String extensionName, + MachineExtensionUpdate extensionParameters, Context context) { return updateAsync(resourceGroupName, machineName, extensionName, extensionParameters, context).block(); } /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -804,13 +654,11 @@ public MachineExtensionInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String machineName, String extensionName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String machineName, + String extensionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -823,31 +671,19 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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, - extensionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, machineName, + extensionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -858,13 +694,11 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String machineName, String extensionName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String machineName, + String extensionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -877,28 +711,18 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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, - extensionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -908,18 +732,16 @@ private Mono>> deleteWithResponseAsync( * @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 extensionName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String machineName, + String extensionName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, machineName, extensionName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -930,19 +752,18 @@ private PollerFlux, Void> beginDeleteAsync( * @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 extensionName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String machineName, + String extensionName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, machineName, extensionName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, machineName, extensionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -952,14 +773,14 @@ private PollerFlux, Void> beginDeleteAsync( * @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 extensionName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, + String extensionName) { return this.beginDeleteAsync(resourceGroupName, machineName, extensionName).getSyncPoller(); } /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -970,14 +791,14 @@ public SyncPoller, Void> beginDelete( * @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 extensionName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String machineName, + String extensionName, Context context) { return this.beginDeleteAsync(resourceGroupName, machineName, extensionName, context).getSyncPoller(); } /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -988,14 +809,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String machineName, String extensionName) { - return beginDeleteAsync(resourceGroupName, machineName, extensionName) - .last() + return beginDeleteAsync(resourceGroupName, machineName, extensionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -1006,16 +826,15 @@ private Mono deleteAsync(String resourceGroupName, String machineName, Str * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String machineName, String extensionName, Context context) { - return beginDeleteAsync(resourceGroupName, machineName, extensionName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String machineName, String extensionName, + Context context) { + return beginDeleteAsync(resourceGroupName, machineName, extensionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -1030,7 +849,7 @@ public void delete(String resourceGroupName, String machineName, String extensio /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -1046,7 +865,7 @@ public void delete(String resourceGroupName, String machineName, String extensio /** * The operation to get the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. @@ -1056,13 +875,11 @@ public void delete(String resourceGroupName, String machineName, String extensio * @return describes a Machine Extension along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String machineName, String extensionName) { + private Mono> getWithResponseAsync(String resourceGroupName, String machineName, + String extensionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1075,31 +892,19 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceGroupName, - machineName, - extensionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, machineName, + extensionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to get the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. @@ -1110,13 +915,11 @@ private Mono> getWithResponseAsync( * @return describes a Machine Extension along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String machineName, String extensionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String machineName, + String extensionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1129,28 +932,18 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + 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, - extensionName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context); + return service.get(this.client.getEndpoint(), resourceGroupName, machineName, extensionName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); } /** * The operation to get the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. @@ -1167,7 +960,7 @@ private Mono getAsync(String resourceGroupName, String ma /** * The operation to get the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. @@ -1178,14 +971,14 @@ private Mono getAsync(String resourceGroupName, String ma * @return describes a Machine Extension along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String machineName, String extensionName, Context context) { + public Response getWithResponse(String resourceGroupName, String machineName, + String extensionName, Context context) { return getWithResponseAsync(resourceGroupName, machineName, extensionName, context).block(); } /** * The operation to get the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. @@ -1201,7 +994,7 @@ public MachineExtensionInner get(String resourceGroupName, String machineName, S /** * The operation to get all extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. @@ -1209,16 +1002,14 @@ public MachineExtensionInner get(String resourceGroupName, String machineName, S * @throws 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 Machine Extensions List Result along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String machineName, String expand) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1228,40 +1019,21 @@ private Mono> listSinglePageAsync( 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.")); + 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)) + .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 extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. @@ -1270,16 +1042,14 @@ private Mono> listSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes the Machine Extensions List Result along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String machineName, String expand, Context context) { + 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1289,37 +1059,21 @@ private Mono> listSinglePageAsync( 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.")); + 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)); + .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 extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. @@ -1330,14 +1084,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String machineName, String expand) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, machineName, expand), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, machineName, expand), nextLink -> listNextSinglePageAsync(nextLink)); } /** * The operation to get all extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1348,14 +1101,13 @@ private PagedFlux listAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String machineName) { final String expand = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, machineName, expand), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, machineName, expand), nextLink -> listNextSinglePageAsync(nextLink)); } /** * The operation to get all extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. @@ -1366,16 +1118,15 @@ private PagedFlux listAsync(String resourceGroupName, Str * @return describes the Machine Extensions List Result as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String machineName, String expand, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, machineName, expand, context), + 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 extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1391,7 +1142,7 @@ public PagedIterable list(String resourceGroupName, Strin /** * The operation to get all extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. @@ -1402,21 +1153,22 @@ public PagedIterable list(String resourceGroupName, Strin * @return describes the Machine Extensions List Result as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String machineName, String expand, Context context) { + 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 - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Machine Extensions List Result along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1424,37 +1176,28 @@ private Mono> listNextSinglePageAsync(Strin 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.")); + 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)) + 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 - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Machine Extensions List Result along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1462,23 +1205,13 @@ private Mono> listNextSinglePageAsync(Strin 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.")); + 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)); + 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/MachineExtensionsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsImpl.java index f51b4cace0f1..458769f1813c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsImpl.java @@ -21,8 +21,7 @@ public final class MachineExtensionsImpl implements MachineExtensions { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - public MachineExtensionsImpl( - MachineExtensionsClient innerClient, + public MachineExtensionsImpl(MachineExtensionsClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -36,15 +35,12 @@ public void delete(String resourceGroupName, String machineName, String extensio this.serviceClient().delete(resourceGroupName, machineName, extensionName, context); } - public Response getWithResponse( - String resourceGroupName, String machineName, String extensionName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, machineName, extensionName, context); + public Response getWithResponse(String resourceGroupName, String machineName, + String extensionName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, machineName, extensionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new MachineExtensionImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,116 +58,88 @@ public MachineExtension get(String resourceGroupName, String machineName, String public PagedIterable list(String resourceGroupName, String machineName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, machineName); - return Utils.mapPage(inner, inner1 -> new MachineExtensionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineExtensionImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String machineName, String expand, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, machineName, expand, context); - return Utils.mapPage(inner, inner1 -> new MachineExtensionImpl(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 MachineExtensionImpl(inner1, this.manager())); } public MachineExtension getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String machineName = Utils.getValueFromIdByName(id, "machines"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); } - String extensionName = Utils.getValueFromIdByName(id, "extensions"); + String extensionName = ResourceManagerUtils.getValueFromIdByName(id, "extensions"); if (extensionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); } return this.getWithResponse(resourceGroupName, machineName, extensionName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String machineName = Utils.getValueFromIdByName(id, "machines"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); } - String extensionName = Utils.getValueFromIdByName(id, "extensions"); + String extensionName = ResourceManagerUtils.getValueFromIdByName(id, "extensions"); if (extensionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); } return this.getWithResponse(resourceGroupName, machineName, extensionName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String machineName = Utils.getValueFromIdByName(id, "machines"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); } - String extensionName = Utils.getValueFromIdByName(id, "extensions"); + String extensionName = ResourceManagerUtils.getValueFromIdByName(id, "extensions"); if (extensionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); } this.delete(resourceGroupName, machineName, extensionName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String machineName = Utils.getValueFromIdByName(id, "machines"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'machines'.", id))); } - String extensionName = Utils.getValueFromIdByName(id, "extensions"); + String extensionName = ResourceManagerUtils.getValueFromIdByName(id, "extensions"); if (extensionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'extensions'.", id))); } this.delete(resourceGroupName, machineName, extensionName, context); } 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 ce0e63ee6924..78ead85fafc1 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 @@ -6,7 +6,6 @@ import com.azure.core.management.SystemData; import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner; import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner; @@ -28,6 +27,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.UUID; import java.util.stream.Collectors; public final class MachineImpl implements Machine { @@ -68,12 +68,9 @@ public Map tags() { public List resources() { List inner = this.innerModel().resources(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new MachineExtensionImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new MachineExtensionImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } @@ -116,12 +113,7 @@ public OSProfile osProfile() { } public LicenseProfileMachineInstanceView licenseProfile() { - LicenseProfileMachineInstanceViewInner inner = this.innerModel().licenseProfile(); - if (inner != null) { - return new LicenseProfileMachineInstanceViewImpl(inner, this.manager()); - } else { - return null; - } + return this.innerModel().licenseProfile(); } public String provisioningState() { @@ -149,7 +141,7 @@ public String agentVersion() { return this.innerModel().agentVersion(); } - public String vmId() { + public UUID vmId() { return this.innerModel().vmId(); } @@ -177,7 +169,7 @@ public String osType() { return this.innerModel().osType(); } - public String vmUuid() { + public UUID vmUuid() { return this.innerModel().vmUuid(); } @@ -194,6 +186,10 @@ public String osSku() { return this.innerModel().osSku(); } + public String osEdition() { + return this.innerModel().osEdition(); + } + public String domainName() { return this.innerModel().domainName(); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineInstallPatchesResultImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineInstallPatchesResultImpl.java index a7673348af13..45e828577edb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineInstallPatchesResultImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineInstallPatchesResultImpl.java @@ -19,8 +19,7 @@ public final class MachineInstallPatchesResultImpl implements MachineInstallPatc private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - MachineInstallPatchesResultImpl( - MachineInstallPatchesResultInner innerObject, + MachineInstallPatchesResultImpl(MachineInstallPatchesResultInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 5346dcd0fb75..093f50020fed 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.hybridcompute.implementation; import com.azure.core.management.exception.ManagementError; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachinePropertiesInner; import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner; import com.azure.resourcemanager.hybridcompute.models.AgentConfiguration; @@ -23,14 +22,14 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.UUID; public final class MachinePropertiesImpl implements MachineProperties { private MachinePropertiesInner innerObject; private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - MachinePropertiesImpl( - MachinePropertiesInner innerObject, + MachinePropertiesImpl(MachinePropertiesInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -61,12 +60,7 @@ public OSProfile osProfile() { } public LicenseProfileMachineInstanceView licenseProfile() { - LicenseProfileMachineInstanceViewInner inner = this.innerModel().licenseProfile(); - if (inner != null) { - return new LicenseProfileMachineInstanceViewImpl(inner, this.manager()); - } else { - return null; - } + return this.innerModel().licenseProfile(); } public String provisioningState() { @@ -94,7 +88,7 @@ public String agentVersion() { return this.innerModel().agentVersion(); } - public String vmId() { + public UUID vmId() { return this.innerModel().vmId(); } @@ -122,7 +116,7 @@ public String osType() { return this.innerModel().osType(); } - public String vmUuid() { + public UUID vmUuid() { return this.innerModel().vmUuid(); } @@ -139,6 +133,10 @@ public String osSku() { return this.innerModel().osSku(); } + public String osEdition() { + return this.innerModel().osEdition(); + } + public String domainName() { return this.innerModel().domainName(); } 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 000000000000..0b5386c5d7c0 --- /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 000000000000..6d6cb055edf8 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineRunCommandsClientImpl.java @@ -0,0 +1,952 @@ +// 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({ 200, 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 000000000000..2921e1640a0c --- /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/MachinesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesClientImpl.java index 7604ab370835..de0d7470f651 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesClientImpl.java @@ -35,24 +35,29 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.MachineAssessPatchesResultInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInstallPatchesResultInner; -import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters; import com.azure.resourcemanager.hybridcompute.models.MachineListResult; 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 MachinesClient. */ +/** + * An instance of this class provides access to all the operations defined in MachinesClient. + */ public final class MachinesClientImpl implements MachinesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MachinesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HybridComputeManagementClientImpl client; /** * Initializes an instance of MachinesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MachinesClientImpl(HybridComputeManagementClientImpl client) { @@ -67,113 +72,80 @@ public final class MachinesClientImpl implements MachinesClient { @Host("{$host}") @ServiceInterface(name = "HybridComputeManagem") public interface MachinesService { - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}") + @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("machineName") String machineName, - @QueryParam("$expand") InstanceViewTypes expand, - @HeaderParam("Accept") String accept, - Context context); + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/assessPatches") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> assessPatches( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @HeaderParam("Accept") String accept, - Context context); + Mono>> assessPatches(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/installPatches") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> installPatches( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, + Mono>> installPatches(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("name") String name, @BodyParam("application/json") MachineInstallPatchesParameters installPatchesInput, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("$expand") String expand, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$expand") String expand, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/machines") - @ExpectedResponses({200}) + @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); + 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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * The operation to delete a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -184,16 +156,12 @@ Mono> listBySubscriptionNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String machineName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -204,23 +172,14 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to delete a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param context The context to associate with this operation. @@ -230,19 +189,15 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String machineName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String machineName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -253,20 +208,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, machineName, accept, context); } /** * The operation to delete a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -281,7 +229,7 @@ private Mono deleteAsync(String resourceGroupName, String machineName) { /** * The operation to delete a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param context The context to associate with this operation. @@ -297,7 +245,7 @@ public Response deleteWithResponse(String resourceGroupName, String machin /** * The operation to delete a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -311,7 +259,7 @@ public void delete(String resourceGroupName, String machineName) { /** * Retrieves information about the model view or the instance view of a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param expand The expand expression to apply on the operation. @@ -321,19 +269,15 @@ public void delete(String resourceGroupName, String machineName) { * @return describes a hybrid machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String machineName, InstanceViewTypes expand) { + private Mono> getByResourceGroupWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -344,24 +288,14 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - expand, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, expand, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Retrieves information about the model view or the instance view of a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param expand The expand expression to apply on the operation. @@ -372,19 +306,15 @@ private Mono> getByResourceGroupWithResponseAsync( * @return describes a hybrid machine along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String machineName, InstanceViewTypes expand, Context context) { + private Mono> getByResourceGroupWithResponseAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -395,21 +325,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - expand, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, expand, accept, context); } /** * Retrieves information about the model view or the instance view of a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -419,14 +341,14 @@ private Mono> getByResourceGroupWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String machineName) { - final InstanceViewTypes expand = null; + final String expand = null; return getByResourceGroupWithResponseAsync(resourceGroupName, machineName, expand) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Retrieves information about the model view or the instance view of a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param expand The expand expression to apply on the operation. @@ -437,14 +359,14 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str * @return describes a hybrid machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String machineName, InstanceViewTypes expand, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, + String expand, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, machineName, expand, context).block(); } /** * Retrieves information about the model view or the instance view of a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -454,34 +376,30 @@ public Response getByResourceGroupWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) public MachineInner getByResourceGroup(String resourceGroupName, String machineName) { - final InstanceViewTypes expand = null; + final String expand = null; return getByResourceGroupWithResponse(resourceGroupName, machineName, expand, Context.NONE).getValue(); } /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes the properties of an AssessPatches result along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> assessPatchesWithResponseAsync(String resourceGroupName, String name) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -492,23 +410,14 @@ private Mono>> assessPatchesWithResponseAsync(String r } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .assessPatches( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - accept, - context)) + .withContext(context -> service.assessPatches(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, name, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. @@ -516,22 +425,18 @@ private Mono>> assessPatchesWithResponseAsync(String r * @throws 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 properties of an AssessPatches result along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> assessPatchesWithResponseAsync( - String resourceGroupName, String name, Context context) { + private Mono>> assessPatchesWithResponseAsync(String resourceGroupName, String name, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -542,20 +447,13 @@ private Mono>> assessPatchesWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .assessPatches( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - accept, - context); + return service.assessPatches(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, name, accept, context); } /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -567,19 +465,14 @@ private Mono>> assessPatchesWithResponseAsync( private PollerFlux, MachineAssessPatchesResultInner> beginAssessPatchesAsync(String resourceGroupName, String name) { Mono>> mono = assessPatchesWithResponseAsync(resourceGroupName, name); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MachineAssessPatchesResultInner.class, - MachineAssessPatchesResultInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineAssessPatchesResultInner.class, MachineAssessPatchesResultInner.class, + this.client.getContext()); } /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. @@ -593,19 +486,14 @@ private Mono>> assessPatchesWithResponseAsync( beginAssessPatchesAsync(String resourceGroupName, String name, Context context) { context = this.client.mergeContext(context); Mono>> mono = assessPatchesWithResponseAsync(resourceGroupName, name, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MachineAssessPatchesResultInner.class, - MachineAssessPatchesResultInner.class, - context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineAssessPatchesResultInner.class, MachineAssessPatchesResultInner.class, + context); } /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -614,14 +502,14 @@ private Mono>> assessPatchesWithResponseAsync( * @return the {@link SyncPoller} for polling of describes the properties of an AssessPatches result. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MachineAssessPatchesResultInner> beginAssessPatches( - String resourceGroupName, String name) { + public SyncPoller, MachineAssessPatchesResultInner> + beginAssessPatches(String resourceGroupName, String name) { return this.beginAssessPatchesAsync(resourceGroupName, name).getSyncPoller(); } /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. @@ -631,14 +519,14 @@ public SyncPoller, MachineAssessPatc * @return the {@link SyncPoller} for polling of describes the properties of an AssessPatches result. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, MachineAssessPatchesResultInner> beginAssessPatches( - String resourceGroupName, String name, Context context) { + public SyncPoller, MachineAssessPatchesResultInner> + beginAssessPatches(String resourceGroupName, String name, Context context) { return this.beginAssessPatchesAsync(resourceGroupName, name, context).getSyncPoller(); } /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -653,7 +541,7 @@ private Mono assessPatchesAsync(String resource /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. @@ -663,16 +551,15 @@ private Mono assessPatchesAsync(String resource * @return describes the properties of an AssessPatches result on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono assessPatchesAsync( - String resourceGroupName, String name, Context context) { - return beginAssessPatchesAsync(resourceGroupName, name, context) - .last() + private Mono assessPatchesAsync(String resourceGroupName, String name, + Context context) { + return beginAssessPatchesAsync(resourceGroupName, name, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -687,7 +574,7 @@ public MachineAssessPatchesResultInner assessPatches(String resourceGroupName, S /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. @@ -703,7 +590,7 @@ public MachineAssessPatchesResultInner assessPatches(String resourceGroupName, S /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -711,22 +598,18 @@ public MachineAssessPatchesResultInner assessPatches(String resourceGroupName, S * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result summary of an installation operation along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> installPatchesWithResponseAsync( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput) { + private Mono>> installPatchesWithResponseAsync(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -743,24 +626,14 @@ private Mono>> installPatchesWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .installPatches( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - installPatchesInput, - accept, - context)) + .withContext(context -> service.installPatches(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, name, installPatchesInput, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -769,22 +642,18 @@ private Mono>> installPatchesWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result summary of an installation operation along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> installPatchesWithResponseAsync( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput, Context context) { + private Mono>> installPatchesWithResponseAsync(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -801,21 +670,13 @@ private Mono>> installPatchesWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .installPatches( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - installPatchesInput, - accept, - context); + return service.installPatches(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, name, installPatchesInput, accept, context); } /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -826,23 +687,18 @@ private Mono>> installPatchesWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MachineInstallPatchesResultInner> - beginInstallPatchesAsync( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput) { - Mono>> mono = - installPatchesWithResponseAsync(resourceGroupName, name, installPatchesInput); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MachineInstallPatchesResultInner.class, - MachineInstallPatchesResultInner.class, - this.client.getContext()); + beginInstallPatchesAsync(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput) { + Mono>> mono + = installPatchesWithResponseAsync(resourceGroupName, name, installPatchesInput); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineInstallPatchesResultInner.class, + MachineInstallPatchesResultInner.class, this.client.getContext()); } /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -854,27 +710,19 @@ private Mono>> installPatchesWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, MachineInstallPatchesResultInner> - beginInstallPatchesAsync( - String resourceGroupName, - String name, - MachineInstallPatchesParameters installPatchesInput, - Context context) { + beginInstallPatchesAsync(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - installPatchesWithResponseAsync(resourceGroupName, name, installPatchesInput, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - MachineInstallPatchesResultInner.class, - MachineInstallPatchesResultInner.class, - context); + Mono>> mono + = installPatchesWithResponseAsync(resourceGroupName, name, installPatchesInput, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), MachineInstallPatchesResultInner.class, + MachineInstallPatchesResultInner.class, context); } /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -885,14 +733,14 @@ private Mono>> installPatchesWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MachineInstallPatchesResultInner> - beginInstallPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput) { + beginInstallPatches(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput) { return this.beginInstallPatchesAsync(resourceGroupName, name, installPatchesInput).getSyncPoller(); } /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -904,17 +752,14 @@ private Mono>> installPatchesWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, MachineInstallPatchesResultInner> - beginInstallPatches( - String resourceGroupName, - String name, - MachineInstallPatchesParameters installPatchesInput, + beginInstallPatches(String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput, Context context) { return this.beginInstallPatchesAsync(resourceGroupName, name, installPatchesInput, context).getSyncPoller(); } /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -924,16 +769,15 @@ private Mono>> installPatchesWithResponseAsync( * @return the result summary of an installation operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono installPatchesAsync( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput) { - return beginInstallPatchesAsync(resourceGroupName, name, installPatchesInput) - .last() + private Mono installPatchesAsync(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput) { + return beginInstallPatchesAsync(resourceGroupName, name, installPatchesInput).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -944,16 +788,15 @@ private Mono installPatchesAsync( * @return the result summary of an installation operation on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono installPatchesAsync( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput, Context context) { - return beginInstallPatchesAsync(resourceGroupName, name, installPatchesInput, context) - .last() + private Mono installPatchesAsync(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput, Context context) { + return beginInstallPatchesAsync(resourceGroupName, name, installPatchesInput, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -963,14 +806,14 @@ private Mono installPatchesAsync( * @return the result summary of an installation operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MachineInstallPatchesResultInner installPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput) { + public MachineInstallPatchesResultInner installPatches(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput) { return installPatchesAsync(resourceGroupName, name, installPatchesInput).block(); } /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -981,37 +824,33 @@ public MachineInstallPatchesResultInner installPatches( * @return the result summary of an installation operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MachineInstallPatchesResultInner installPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput, Context context) { + public MachineInstallPatchesResultInner installPatches(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput, Context context) { return installPatchesAsync(resourceGroupName, name, installPatchesInput, context).block(); } /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param expand Expands referenced resources. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String expand) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String expand) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1019,33 +858,17 @@ private Mono> listByResourceGroupSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - expand, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, expand, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param expand Expands referenced resources. * @param context The context to associate with this operation. @@ -1053,22 +876,18 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String expand, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String expand, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1077,29 +896,16 @@ private Mono> listByResourceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - expand, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, expand, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param expand Expands referenced resources. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1109,15 +915,14 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1127,15 +932,14 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { final String expand = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param expand Expands referenced resources. * @param context The context to associate with this operation. @@ -1146,15 +950,14 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, String expand, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, expand, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1170,7 +973,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param expand Expands referenced resources. * @param context The context to associate with this operation. @@ -1187,112 +990,79 @@ public PagedIterable listByResourceGroup(String resourceGroupName, /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@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.")); + 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.")); + 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@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.")); + 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.")); + 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, + .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)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1301,14 +1071,14 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. @@ -1321,7 +1091,7 @@ public PagedIterable list() { /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1335,14 +1105,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1350,38 +1121,30 @@ private Mono> listByResourceGroupNextSinglePageAsync 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.")); + 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)) + .>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 - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { @@ -1389,36 +1152,27 @@ private Mono> listByResourceGroupNextSinglePageAsync 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.")); + 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)); + 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 - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1426,38 +1180,30 @@ private Mono> listBySubscriptionNextSinglePageAsync( 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.")); + 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)) + .>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 - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { @@ -1465,23 +1211,13 @@ private Mono> listBySubscriptionNextSinglePageAsync( 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.")); + 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)); + 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/MachinesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesImpl.java index 5bfdaab1a37b..4a2e2c3fdb58 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachinesImpl.java @@ -13,7 +13,6 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.MachineAssessPatchesResultInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInstallPatchesResultInner; -import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; import com.azure.resourcemanager.hybridcompute.models.Machine; import com.azure.resourcemanager.hybridcompute.models.MachineAssessPatchesResult; import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters; @@ -27,14 +26,14 @@ public final class MachinesImpl implements Machines { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - public MachinesImpl( - MachinesClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + public MachinesImpl(MachinesClient innerClient, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String machineName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String machineName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, machineName, context); } @@ -42,15 +41,12 @@ public void deleteByResourceGroup(String resourceGroupName, String machineName) this.serviceClient().delete(resourceGroupName, machineName); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String machineName, InstanceViewTypes expand, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, machineName, expand, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, String expand, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, machineName, expand, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new MachineImpl(inner.getValue(), this.manager())); } else { return null; @@ -84,10 +80,10 @@ public MachineAssessPatchesResult assessPatches(String resourceGroupName, String } } - public MachineInstallPatchesResult installPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput) { - MachineInstallPatchesResultInner inner = - this.serviceClient().installPatches(resourceGroupName, name, installPatchesInput); + public MachineInstallPatchesResult installPatches(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput) { + MachineInstallPatchesResultInner inner + = this.serviceClient().installPatches(resourceGroupName, name, installPatchesInput); if (inner != null) { return new MachineInstallPatchesResultImpl(inner, this.manager()); } else { @@ -95,10 +91,10 @@ public MachineInstallPatchesResult installPatches( } } - public MachineInstallPatchesResult installPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput, Context context) { - MachineInstallPatchesResultInner inner = - this.serviceClient().installPatches(resourceGroupName, name, installPatchesInput, context); + public MachineInstallPatchesResult installPatches(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput, Context context) { + MachineInstallPatchesResultInner inner + = this.serviceClient().installPatches(resourceGroupName, name, installPatchesInput, context); if (inner != null) { return new MachineInstallPatchesResultImpl(inner, this.manager()); } else { @@ -108,23 +104,23 @@ public MachineInstallPatchesResult installPatches( public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, String expand, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, expand, context); - return Utils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, expand, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MachineImpl(inner1, this.manager())); } private MachinesClient serviceClient() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfileImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfileImpl.java index 8ae7c8220cd1..e7e2afbbc326 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfileImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfileImpl.java @@ -15,8 +15,8 @@ public final class NetworkProfileImpl implements NetworkProfile { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - NetworkProfileImpl( - NetworkProfileInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + NetworkProfileImpl(NetworkProfileInner innerObject, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesClientImpl.java index 9c688a13acd6..027e52e1d6c1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesClientImpl.java @@ -25,22 +25,28 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in NetworkProfilesClient. */ +/** + * An instance of this class provides access to all the operations defined in NetworkProfilesClient. + */ public final class NetworkProfilesClientImpl implements NetworkProfilesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final NetworkProfilesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HybridComputeManagementClientImpl client; /** * Initializes an instance of NetworkProfilesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ NetworkProfilesClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy.create(NetworkProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(NetworkProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -51,45 +57,36 @@ public final class NetworkProfilesClientImpl implements NetworkProfilesClient { @Host("{$host}") @ServiceInterface(name = "HybridComputeManagem") public interface NetworkProfilesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/networkProfile") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/networkProfile") + @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("machineName") String machineName, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @HeaderParam("Accept") String accept, Context context); } /** * The operation to get network information of hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes the network information on this machine along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String resourceGroupName, String machineName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -100,23 +97,14 @@ private Mono> getWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to get network information of hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param context The context to associate with this operation. @@ -124,22 +112,18 @@ private Mono> getWithResponseAsync(String resource * @throws 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 network information on this machine along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String machineName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String machineName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -150,20 +134,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, machineName, accept, context); } /** * The operation to get network information of hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -178,7 +155,7 @@ private Mono getAsync(String resourceGroupName, String mach /** * The operation to get network information of hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param context The context to associate with this operation. @@ -188,14 +165,14 @@ private Mono getAsync(String resourceGroupName, String mach * @return describes the network information on this machine along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String machineName, Context context) { + public Response getWithResponse(String resourceGroupName, String machineName, + Context context) { return getWithResponseAsync(resourceGroupName, machineName, context).block(); } /** * The operation to get network information of hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesImpl.java index 3ed703f3f392..7ccfb735b7f6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/NetworkProfilesImpl.java @@ -20,21 +20,17 @@ public final class NetworkProfilesImpl implements NetworkProfiles { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - public NetworkProfilesImpl( - NetworkProfilesClient innerClient, + public NetworkProfilesImpl(NetworkProfilesClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public Response getWithResponse(String resourceGroupName, String machineName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, machineName, context); + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, machineName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new NetworkProfileImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationValueImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationValueImpl.java index 323ba788ca21..9fe0529a8bea 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationValueImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationValueImpl.java @@ -13,8 +13,8 @@ public final class OperationValueImpl implements OperationValue { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - OperationValueImpl( - OperationValueInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + OperationValueImpl(OperationValueInner innerObject, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java index 8841ac50ae8b..cc6d4ee64a40 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsClientImpl.java @@ -29,22 +29,28 @@ import com.azure.resourcemanager.hybridcompute.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HybridComputeManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -55,75 +61,63 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "HybridComputeManagem") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.HybridCompute/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of hybrid compute operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of hybrid compute operations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of hybrid compute operations 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a list of hybrid compute operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of hybrid compute operations along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of hybrid compute operations 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.")); + 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 - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), null, null)); } /** * Gets a list of hybrid compute operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of hybrid compute operations as paginated response with {@link PagedFlux}. @@ -135,7 +129,7 @@ private PagedFlux listAsync() { /** * Gets a list of hybrid compute operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -149,7 +143,7 @@ private PagedFlux listAsync(Context context) { /** * Gets a list of hybrid compute operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of hybrid compute operations as paginated response with {@link PagedIterable}. @@ -161,7 +155,7 @@ public PagedIterable list() { /** * Gets a list of hybrid compute operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsImpl.java index bb51706c3be2..9a99cd3708ca 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/OperationsImpl.java @@ -9,8 +9,8 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridcompute.fluent.OperationsClient; import com.azure.resourcemanager.hybridcompute.fluent.models.OperationValueInner; -import com.azure.resourcemanager.hybridcompute.models.OperationValue; import com.azure.resourcemanager.hybridcompute.models.Operations; +import com.azure.resourcemanager.hybridcompute.models.OperationValue; public final class OperationsImpl implements Operations { private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); @@ -19,20 +19,20 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationValueImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationValueImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationValueImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationValueImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionImpl.java index dfe0fcdbafa0..fc4d7778a736 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionImpl.java @@ -61,27 +61,22 @@ public PrivateEndpointConnectionImpl withExistingPrivateLinkScope(String resourc } public PrivateEndpointConnection create() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), + Context.NONE); return this; } public PrivateEndpointConnection create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), context); return this; } - PrivateEndpointConnectionImpl( - String name, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { + PrivateEndpointConnectionImpl(String name, + com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = new PrivateEndpointConnectionInner(); this.serviceManager = serviceManager; this.privateEndpointConnectionName = name; @@ -92,52 +87,43 @@ public PrivateEndpointConnectionImpl update() { } public PrivateEndpointConnection apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), + Context.NONE); return this; } public PrivateEndpointConnection apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, scopeName, privateEndpointConnectionName, this.innerModel(), context); return this; } - PrivateEndpointConnectionImpl( - PrivateEndpointConnectionInner innerObject, + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.scopeName = Utils.getValueFromIdByName(innerObject.id(), "privateLinkScopes"); - this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.scopeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateLinkScopes"); + this.privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); } public PrivateEndpointConnection refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, Context.NONE) + .getValue(); return this; } public PrivateEndpointConnection refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, context) + .getValue(); return this; } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsClientImpl.java index 6b7ca74b7fef..96e6ef3a3ad5 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsClientImpl.java @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateEndpointConnectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HybridComputeManagementClientImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateEndpointConnectionsClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy - .create( - PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,80 +70,61 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi @Host("{$host}") @ServiceInterface(name = "HybridComputeManagem") public interface PrivateEndpointConnectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("scopeName") String scopeName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("scopeName") String scopeName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("scopeName") String scopeName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByPrivateLinkScope( - @HostParam("$host") String endpoint, + Mono> listByPrivateLinkScope(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("scopeName") String scopeName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPrivateLinkScopeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -149,19 +134,15 @@ Mono> listByPrivateLinkScopeNext( * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String scopeName, String privateEndpointConnectionName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String scopeName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -171,31 +152,20 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - privateEndpointConnectionName, - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -206,19 +176,15 @@ private Mono> getWithResponseAsync( * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String scopeName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -228,28 +194,18 @@ private Mono> getWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - privateEndpointConnectionName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, accept, context); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -259,15 +215,15 @@ private Mono> getWithResponseAsync( * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String scopeName, String privateEndpointConnectionName) { + private Mono getAsync(String resourceGroupName, String scopeName, + String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, scopeName, privateEndpointConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -278,14 +234,14 @@ private Mono getAsync( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { + public Response getWithResponse(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, Context context) { return getWithResponseAsync(resourceGroupName, scopeName, privateEndpointConnectionName, context).block(); } /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -295,14 +251,14 @@ public Response getWithResponse( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( - String resourceGroupName, String scopeName, String privateEndpointConnectionName) { + public PrivateEndpointConnectionInner get(String resourceGroupName, String scopeName, + String privateEndpointConnectionName) { return getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, Context.NONE).getValue(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -313,22 +269,15 @@ public PrivateEndpointConnectionInner get( * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -338,10 +287,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -350,25 +297,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - privateEndpointConnectionName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, privateEndpointConnectionName, parameters, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -380,23 +317,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return a private endpoint connection along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -406,10 +335,8 @@ private Mono>> createOrUpdateWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); @@ -418,22 +345,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - privateEndpointConnectionName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, parameters, accept, context); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -445,26 +363,18 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, + beginCreateOrUpdateAsync(String resourceGroupName, String scopeName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionInner.class, - PrivateEndpointConnectionInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + this.client.getContext()); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -477,29 +387,19 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { + beginCreateOrUpdateAsync(String resourceGroupName, String scopeName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, scopeName, privateEndpointConnectionName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionInner.class, - PrivateEndpointConnectionInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, scopeName, + privateEndpointConnectionName, parameters, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + context); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -511,18 +411,15 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, + String resourceGroupName, String scopeName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters) + return this.beginCreateOrUpdateAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters) .getSyncPoller(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -535,11 +432,8 @@ public SyncPoller, PrivateEndpointCon */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { + String resourceGroupName, String scopeName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner parameters, Context context) { return this .beginCreateOrUpdateAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters, context) .getSyncPoller(); @@ -547,7 +441,7 @@ public SyncPoller, PrivateEndpointCon /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -558,19 +452,15 @@ public SyncPoller, PrivateEndpointCon * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { + return beginCreateOrUpdateAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -582,21 +472,15 @@ private Mono createOrUpdateAsync( * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, scopeName, privateEndpointConnectionName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -607,17 +491,14 @@ private Mono createOrUpdateAsync( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters) { + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { return createOrUpdateAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters).block(); } /** * Approve or reject a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -629,19 +510,15 @@ public PrivateEndpointConnectionInner createOrUpdate( * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String scopeName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, - Context context) { + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, scopeName, privateEndpointConnectionName, parameters, context) .block(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -651,19 +528,15 @@ public PrivateEndpointConnectionInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String scopeName, String privateEndpointConnectionName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String scopeName, + String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -673,31 +546,20 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - privateEndpointConnectionName, - accept, - context)) + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -708,19 +570,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -730,28 +588,18 @@ private Mono>> deleteWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - privateEndpointConnectionName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, privateEndpointConnectionName, accept, context); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -761,19 +609,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String scopeName, String privateEndpointConnectionName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, scopeName, privateEndpointConnectionName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String scopeName, + String privateEndpointConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, scopeName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -784,19 +630,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, scopeName, privateEndpointConnectionName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, scopeName, privateEndpointConnectionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -806,14 +651,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String scopeName, String privateEndpointConnectionName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName, + String privateEndpointConnectionName) { return this.beginDeleteAsync(resourceGroupName, scopeName, privateEndpointConnectionName).getSyncPoller(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -824,16 +669,15 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, scopeName, privateEndpointConnectionName, context) + public SyncPoller, Void> beginDelete(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, scopeName, privateEndpointConnectionName, context) .getSyncPoller(); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -844,14 +688,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String scopeName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, scopeName, privateEndpointConnectionName) - .last() + return beginDeleteAsync(resourceGroupName, scopeName, privateEndpointConnectionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -862,16 +705,15 @@ private Mono deleteAsync(String resourceGroupName, String scopeName, Strin * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, scopeName, privateEndpointConnectionName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String scopeName, String privateEndpointConnectionName, + Context context) { + return beginDeleteAsync(resourceGroupName, scopeName, privateEndpointConnectionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -886,7 +728,7 @@ public void delete(String resourceGroupName, String scopeName, String privateEnd /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -896,36 +738,32 @@ public void delete(String resourceGroupName, String scopeName, String privateEnd * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { + public void delete(String resourceGroupName, String scopeName, String privateEndpointConnectionName, + Context context) { deleteAsync(resourceGroupName, scopeName, privateEndpointConnectionName, context).block(); } /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all private endpoint connections on a private link scope along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateLinkScopeSinglePageAsync( - String resourceGroupName, String scopeName) { + private Mono> + listByPrivateLinkScopeSinglePageAsync(String resourceGroupName, String scopeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -937,31 +775,16 @@ private Mono> listByPrivateLinkSco final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByPrivateLinkScope( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByPrivateLinkScope(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -969,22 +792,18 @@ private Mono> listByPrivateLinkSco * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all private endpoint connections on a private link scope along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateLinkScopeSinglePageAsync( - String resourceGroupName, String scopeName, Context context) { + private Mono> + listByPrivateLinkScopeSinglePageAsync(String resourceGroupName, String scopeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -996,28 +815,15 @@ private Mono> listByPrivateLinkSco final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByPrivateLinkScope( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByPrivateLinkScope(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1026,16 +832,15 @@ private Mono> listByPrivateLinkSco * @return all private endpoint connections on a private link scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByPrivateLinkScopeAsync( - String resourceGroupName, String scopeName) { - return new PagedFlux<>( - () -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName), + private PagedFlux listByPrivateLinkScopeAsync(String resourceGroupName, + String scopeName) { + return new PagedFlux<>(() -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName), nextLink -> listByPrivateLinkScopeNextSinglePageAsync(nextLink)); } /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -1045,123 +850,105 @@ private PagedFlux listByPrivateLinkScopeAsync( * @return all private endpoint connections on a private link scope as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByPrivateLinkScopeAsync( - String resourceGroupName, String scopeName, Context context) { - return new PagedFlux<>( - () -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName, context), + private PagedFlux listByPrivateLinkScopeAsync(String resourceGroupName, + String scopeName, Context context) { + return new PagedFlux<>(() -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName, context), nextLink -> listByPrivateLinkScopeNextSinglePageAsync(nextLink, context)); } /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a private link scope as paginated response with {@link - * PagedIterable}. + * @return all private endpoint connections on a private link scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByPrivateLinkScope( - String resourceGroupName, String scopeName) { + public PagedIterable listByPrivateLinkScope(String resourceGroupName, + String scopeName) { return new PagedIterable<>(listByPrivateLinkScopeAsync(resourceGroupName, scopeName)); } /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a private link scope as paginated response with {@link - * PagedIterable}. + * @return all private endpoint connections on a private link scope as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByPrivateLinkScope( - String resourceGroupName, String scopeName, Context context) { + public PagedIterable listByPrivateLinkScope(String resourceGroupName, + String scopeName, Context context) { return new PagedIterable<>(listByPrivateLinkScopeAsync(resourceGroupName, scopeName, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateLinkScopeNextSinglePageAsync( - String nextLink) { + private Mono> + listByPrivateLinkScopeNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.listByPrivateLinkScopeNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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 - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private endpoint connections along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateLinkScopeNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByPrivateLinkScopeNextSinglePageAsync(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.")); + 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 - .listByPrivateLinkScopeNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByPrivateLinkScopeNext(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/PrivateEndpointConnectionsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsImpl.java index 2ee5b85584e1..2c344447fa10 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateEndpointConnectionsImpl.java @@ -21,32 +21,28 @@ public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConn private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - public PrivateEndpointConnectionsImpl( - PrivateEndpointConnectionsClient innerClient, + public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, context); + public Response getWithResponse(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateEndpointConnection get( - String resourceGroupName, String scopeName, String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner = - this.serviceClient().get(resourceGroupName, scopeName, privateEndpointConnectionName); + public PrivateEndpointConnection get(String resourceGroupName, String scopeName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner + = this.serviceClient().get(resourceGroupName, scopeName, privateEndpointConnectionName); if (inner != null) { return new PrivateEndpointConnectionImpl(inner, this.manager()); } else { @@ -58,146 +54,101 @@ public void delete(String resourceGroupName, String scopeName, String privateEnd this.serviceClient().delete(resourceGroupName, scopeName, privateEndpointConnectionName); } - public void delete( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context) { + public void delete(String resourceGroupName, String scopeName, String privateEndpointConnectionName, + Context context) { this.serviceClient().delete(resourceGroupName, scopeName, privateEndpointConnectionName, context); } public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName) { - PagedIterable inner = - this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } - public PagedIterable listByPrivateLinkScope( - String resourceGroupName, String scopeName, Context context) { - PagedIterable inner = - this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName, context); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context) { + PagedIterable inner + = this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } public PrivateEndpointConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String scopeName = Utils.getValueFromIdByName(id, "privateLinkScopes"); + String scopeName = ResourceManagerUtils.getValueFromIdByName(id, "privateLinkScopes"); if (scopeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } - return this - .getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, Context.NONE) + return this.getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String scopeName = Utils.getValueFromIdByName(id, "privateLinkScopes"); + String scopeName = ResourceManagerUtils.getValueFromIdByName(id, "privateLinkScopes"); if (scopeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } return this.getWithResponse(resourceGroupName, scopeName, privateEndpointConnectionName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String scopeName = Utils.getValueFromIdByName(id, "privateLinkScopes"); + String scopeName = ResourceManagerUtils.getValueFromIdByName(id, "privateLinkScopes"); if (scopeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } this.delete(resourceGroupName, scopeName, privateEndpointConnectionName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String scopeName = Utils.getValueFromIdByName(id, "privateLinkScopes"); + String scopeName = ResourceManagerUtils.getValueFromIdByName(id, "privateLinkScopes"); if (scopeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); } this.delete(resourceGroupName, scopeName, privateEndpointConnectionName, context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourceImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourceImpl.java index a60d1f87bc24..33f1511d5ac3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourceImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourceImpl.java @@ -14,8 +14,7 @@ public final class PrivateLinkResourceImpl implements PrivateLinkResource { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - PrivateLinkResourceImpl( - PrivateLinkResourceInner innerObject, + PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesClientImpl.java index c9be40dbf2c7..d57f73effd16 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.hybridcompute.models.PrivateLinkResourceListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateLinkResourcesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HybridComputeManagementClientImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateLinkResourcesClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy - .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,71 +62,55 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource @Host("{$host}") @ServiceInterface(name = "HybridComputeManagem") public interface PrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByPrivateLinkScope( - @HostParam("$host") String endpoint, + Mono> listByPrivateLinkScope(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("scopeName") String scopeName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}/privateLinkResources/{groupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("scopeName") String scopeName, - @PathParam("groupName") String groupName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("scopeName") String scopeName, @PathParam("groupName") String groupName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByPrivateLinkScopeNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateLinkScopeSinglePageAsync( - String resourceGroupName, String scopeName) { + private Mono> + listByPrivateLinkScopeSinglePageAsync(String resourceGroupName, String scopeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -133,54 +122,35 @@ private Mono> listByPrivateLinkScopeSing final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByPrivateLinkScope( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByPrivateLinkScope(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateLinkScopeSinglePageAsync( - String resourceGroupName, String scopeName, Context context) { + private Mono> + listByPrivateLinkScopeSinglePageAsync(String resourceGroupName, String scopeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -192,47 +162,33 @@ private Mono> listByPrivateLinkScopeSing final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByPrivateLinkScope( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByPrivateLinkScope(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedFlux}. + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByPrivateLinkScopeAsync( - String resourceGroupName, String scopeName) { - return new PagedFlux<>( - () -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName), + private PagedFlux listByPrivateLinkScopeAsync(String resourceGroupName, + String scopeName) { + return new PagedFlux<>(() -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName), nextLink -> listByPrivateLinkScopeNextSinglePageAsync(nextLink)); } /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -240,26 +196,25 @@ private PagedFlux listByPrivateLinkScopeAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedFlux}. + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByPrivateLinkScopeAsync( - String resourceGroupName, String scopeName, Context context) { - return new PagedFlux<>( - () -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName, context), + private PagedFlux listByPrivateLinkScopeAsync(String resourceGroupName, String scopeName, + Context context) { + return new PagedFlux<>(() -> listByPrivateLinkScopeSinglePageAsync(resourceGroupName, scopeName, context), nextLink -> listByPrivateLinkScopeNextSinglePageAsync(nextLink, context)); } /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName) { @@ -268,7 +223,7 @@ public PagedIterable listByPrivateLinkScope(String res /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -276,40 +231,36 @@ public PagedIterable listByPrivateLinkScope(String res * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByPrivateLinkScope( - String resourceGroupName, String scopeName, Context context) { + public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context) { return new PagedIterable<>(listByPrivateLinkScopeAsync(resourceGroupName, scopeName, context)); } /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param groupName The name of the private link resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with {@link - * Response} on successful completion of {@link Mono}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String scopeName, String groupName) { + private Mono> getWithResponseAsync(String resourceGroupName, String scopeName, + String groupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -323,24 +274,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - groupName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), scopeName, groupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param groupName The name of the private link resource. @@ -348,23 +289,19 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with {@link - * Response} on successful completion of {@link Mono}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String scopeName, String groupName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String scopeName, + String groupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -378,21 +315,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - scopeName, - groupName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), scopeName, groupName, accept, context); } /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param groupName The name of the private link resource. @@ -400,7 +329,7 @@ private Mono> getWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String scopeName, String groupName) { @@ -410,7 +339,7 @@ private Mono getAsync(String resourceGroupName, String /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param groupName The name of the private link resource. @@ -418,18 +347,18 @@ private Mono getAsync(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with {@link - * Response}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String scopeName, String groupName, Context context) { + public Response getWithResponse(String resourceGroupName, String scopeName, + String groupName, Context context) { return getWithResponseAsync(resourceGroupName, scopeName, groupName, context).block(); } /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param groupName The name of the private link resource. @@ -445,14 +374,15 @@ public PrivateLinkResourceInner get(String resourceGroupName, String scopeName, /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByPrivateLinkScopeNextSinglePageAsync(String nextLink) { @@ -460,63 +390,45 @@ private Mono> listByPrivateLinkScopeNext 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.")); + 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.listByPrivateLinkScopeNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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 - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByPrivateLinkScopeNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByPrivateLinkScopeNextSinglePageAsync(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.")); + 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 - .listByPrivateLinkScopeNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByPrivateLinkScopeNext(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/PrivateLinkResourcesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesImpl.java index 0df9328ec07e..0748041ad23a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkResourcesImpl.java @@ -21,35 +21,31 @@ public final class PrivateLinkResourcesImpl implements PrivateLinkResources { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - public PrivateLinkResourcesImpl( - PrivateLinkResourcesClient innerClient, + public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName) { - PagedIterable inner = - this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public PagedIterable listByPrivateLinkScope( - String resourceGroupName, String scopeName, Context context) { - PagedIterable inner = - this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName, context); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + public PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context) { + PagedIterable inner + = this.serviceClient().listByPrivateLinkScope(resourceGroupName, scopeName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String scopeName, String groupName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, scopeName, groupName, context); + public Response getWithResponse(String resourceGroupName, String scopeName, String groupName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, scopeName, groupName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateLinkResourceImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopeValidationDetailsImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopeValidationDetailsImpl.java index 6ed67b57aaf3..41d9eb5519a3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopeValidationDetailsImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopeValidationDetailsImpl.java @@ -16,8 +16,7 @@ public final class PrivateLinkScopeValidationDetailsImpl implements PrivateLinkS private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - PrivateLinkScopeValidationDetailsImpl( - PrivateLinkScopeValidationDetailsInner innerObject, + PrivateLinkScopeValidationDetailsImpl(PrivateLinkScopeValidationDetailsInner innerObject, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesClientImpl.java index 1543133d5dac..2972eb5e6b83 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesClientImpl.java @@ -41,22 +41,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateLinkScopesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkScopesClient. + */ public final class PrivateLinkScopesClientImpl implements PrivateLinkScopesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateLinkScopesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HybridComputeManagementClientImpl client; /** * Initializes an instance of PrivateLinkScopesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateLinkScopesClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy.create(PrivateLinkScopesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(PrivateLinkScopesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -67,233 +73,160 @@ public final class PrivateLinkScopesClientImpl implements PrivateLinkScopesClien @Host("{$host}") @ServiceInterface(name = "HybridComputeManagem") public interface PrivateLinkScopesService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/privateLinkScopes") - @ExpectedResponses({200}) + @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); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + 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"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("scopeName") String scopeName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") - @ExpectedResponses({200}) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("scopeName") String scopeName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") - @ExpectedResponses({200, 201}) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("scopeName") String scopeName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, @BodyParam("application/json") HybridComputePrivateLinkScopeInner parameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/privateLinkScopes/{scopeName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateTags( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("scopeName") String scopeName, - @BodyParam("application/json") TagsResource privateLinkScopeTags, - @HeaderParam("Accept") String accept, + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("scopeName") String scopeName, + @BodyParam("application/json") TagsResource privateLinkScopeTags, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HybridCompute/locations/{location}/privateLinkScopes/{privateLinkScopeId}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getValidationDetails( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, + Mono> getValidationDetails(@HostParam("$host") String endpoint, + @PathParam("location") String location, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("privateLinkScopeId") String privateLinkScopeId, - @HeaderParam("Accept") String accept, + @PathParam("privateLinkScopeId") String privateLinkScopeId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/privateLinkScopes/current") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getValidationDetailsForMachine( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * 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.")); + 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.")); + 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)) + .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())); } /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of all Azure Arc PrivateLinkScopes within a subscription along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * 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.")); + 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.")); + 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, + .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)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with {@link - * PagedFlux}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -302,27 +235,27 @@ private PagedFlux listAsync() { /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with {@link - * PagedFlux}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with {@link - * PagedIterable}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -331,13 +264,13 @@ public PagedIterable list() { /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with {@link - * PagedIterable}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -346,153 +279,116 @@ public PagedIterable list(Context context) { /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName) { + 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.")); + 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.")); + 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)) + .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())); } /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of Azure Arc PrivateLinkScopes within a resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + 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.")); + 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.")); + 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)); + .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)); } /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with {@link - * PagedFlux}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with {@link - * PagedFlux}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + private PagedFlux listByResourceGroupAsync(String resourceGroupName, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -501,24 +397,24 @@ public PagedIterable listByResourceGroup(Str /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, + Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -529,43 +425,30 @@ public PagedIterable listByResourceGroup( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String scopeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (scopeName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - scopeName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), scopeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -575,43 +458,32 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String scopeName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String scopeName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (scopeName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - scopeName, - accept, - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, accept, context); } /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -622,15 +494,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String scopeName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, scopeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -640,18 +510,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String scopeName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String scopeName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, scopeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -666,7 +535,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -682,7 +551,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -697,7 +566,7 @@ private Mono deleteAsync(String resourceGroupName, String scopeName) { /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -708,14 +577,13 @@ private Mono deleteAsync(String resourceGroupName, String scopeName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String scopeName, Context context) { - return beginDeleteAsync(resourceGroupName, scopeName, context) - .last() + return beginDeleteAsync(resourceGroupName, scopeName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -729,7 +597,7 @@ public void delete(String resourceGroupName, String scopeName) { /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -744,103 +612,79 @@ public void delete(String resourceGroupName, String scopeName, Context context) /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String scopeName) { + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String scopeName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (scopeName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - scopeName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), scopeName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String scopeName, Context context) { + private Mono> + getByResourceGroupWithResponseAsync(String resourceGroupName, String scopeName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (scopeName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - scopeName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, accept, context); } /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -849,15 +693,15 @@ private Mono> getByResourceGroupWit * @return an Azure Arc PrivateLinkScope definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String scopeName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String scopeName) { return getByResourceGroupWithResponseAsync(resourceGroupName, scopeName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -867,14 +711,14 @@ private Mono getByResourceGroupAsync( * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String scopeName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String scopeName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, scopeName, context).block(); } /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -890,35 +734,31 @@ public HybridComputePrivateLinkScopeInner getByResourceGroup(String resourceGrou /** * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for * InstrumentationKey nor AppId in the Put operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. + * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String scopeName, HybridComputePrivateLinkScopeInner parameters) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String scopeName, HybridComputePrivateLinkScopeInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (scopeName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); @@ -930,54 +770,40 @@ private Mono> createOrUpdateWithRes } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - scopeName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), scopeName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for * InstrumentationKey nor AppId in the Put operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. + * PrivateLinkScope. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String scopeName, HybridComputePrivateLinkScopeInner parameters, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String scopeName, HybridComputePrivateLinkScopeInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (scopeName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); @@ -989,34 +815,26 @@ private Mono> createOrUpdateWithRes } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - scopeName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, parameters, accept, context); } /** * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for * InstrumentationKey nor AppId in the Put operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. + * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Azure Arc PrivateLinkScope definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String scopeName, HybridComputePrivateLinkScopeInner parameters) { + private Mono createOrUpdateAsync(String resourceGroupName, String scopeName, + HybridComputePrivateLinkScopeInner parameters) { return createOrUpdateWithResponseAsync(resourceGroupName, scopeName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1024,11 +842,11 @@ private Mono createOrUpdateAsync( /** * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for * InstrumentationKey nor AppId in the Put operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. + * PrivateLinkScope. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1036,60 +854,56 @@ private Mono createOrUpdateAsync( * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String scopeName, HybridComputePrivateLinkScopeInner parameters, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String scopeName, HybridComputePrivateLinkScopeInner parameters, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, scopeName, parameters, context).block(); } /** * Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for * InstrumentationKey nor AppId in the Put operation. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param parameters Properties that need to be specified to create or update a Azure Arc for Servers and Clusters - * PrivateLinkScope. + * PrivateLinkScope. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Azure Arc PrivateLinkScope definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HybridComputePrivateLinkScopeInner createOrUpdate( - String resourceGroupName, String scopeName, HybridComputePrivateLinkScopeInner parameters) { + public HybridComputePrivateLinkScopeInner createOrUpdate(String resourceGroupName, String scopeName, + HybridComputePrivateLinkScopeInner parameters) { return createOrUpdateWithResponse(resourceGroupName, scopeName, parameters, Context.NONE).getValue(); } /** * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String scopeName, TagsResource privateLinkScopeTags) { + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String scopeName, TagsResource privateLinkScopeTags) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (scopeName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); @@ -1103,23 +917,14 @@ private Mono> updateTagsWithRespons final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - scopeName, - privateLinkScopeTags, - accept, - context)) + context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, privateLinkScopeTags, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. @@ -1127,27 +932,23 @@ private Mono> updateTagsWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of {@link - * Mono}. + * @return an Azure Arc PrivateLinkScope definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String scopeName, TagsResource privateLinkScopeTags, Context context) { + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String scopeName, TagsResource privateLinkScopeTags, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (scopeName == null) { return Mono.error(new IllegalArgumentException("Parameter scopeName is required and cannot be null.")); @@ -1160,21 +961,13 @@ private Mono> updateTagsWithRespons } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - scopeName, - privateLinkScopeTags, - accept, - context); + return service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), scopeName, privateLinkScopeTags, accept, context); } /** * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. @@ -1184,15 +977,15 @@ private Mono> updateTagsWithRespons * @return an Azure Arc PrivateLinkScope definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync( - String resourceGroupName, String scopeName, TagsResource privateLinkScopeTags) { + private Mono updateTagsAsync(String resourceGroupName, String scopeName, + TagsResource privateLinkScopeTags) { return updateTagsWithResponseAsync(resourceGroupName, scopeName, privateLinkScopeTags) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. @@ -1203,14 +996,14 @@ private Mono updateTagsAsync( * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse( - String resourceGroupName, String scopeName, TagsResource privateLinkScopeTags, Context context) { + public Response updateTagsWithResponse(String resourceGroupName, + String scopeName, TagsResource privateLinkScopeTags, Context context) { return updateTagsWithResponseAsync(resourceGroupName, scopeName, privateLinkScopeTags, context).block(); } /** * Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateLinkScopeTags Updated tag information to set into the PrivateLinkScope instance. @@ -1220,14 +1013,14 @@ public Response updateTagsWithResponse( * @return an Azure Arc PrivateLinkScope definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HybridComputePrivateLinkScopeInner updateTags( - String resourceGroupName, String scopeName, TagsResource privateLinkScopeTags) { + public HybridComputePrivateLinkScopeInner updateTags(String resourceGroupName, String scopeName, + TagsResource privateLinkScopeTags) { return updateTagsWithResponse(resourceGroupName, scopeName, privateLinkScopeTags, Context.NONE).getValue(); } /** * Returns a Azure Arc PrivateLinkScope's validation details. - * + * * @param location The location of the target resource. * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1236,22 +1029,18 @@ public HybridComputePrivateLinkScopeInner updateTags( * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getValidationDetailsWithResponseAsync( - String location, String privateLinkScopeId) { + private Mono> + getValidationDetailsWithResponseAsync(String location, String privateLinkScopeId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (privateLinkScopeId == null) { return Mono @@ -1259,23 +1048,14 @@ private Mono> getValidationDeta } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getValidationDetails( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - privateLinkScopeId, - accept, - context)) + .withContext(context -> service.getValidationDetails(this.client.getEndpoint(), location, + this.client.getApiVersion(), this.client.getSubscriptionId(), privateLinkScopeId, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns a Azure Arc PrivateLinkScope's validation details. - * + * * @param location The location of the target resource. * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -1285,22 +1065,18 @@ private Mono> getValidationDeta * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getValidationDetailsWithResponseAsync( - String location, String privateLinkScopeId, Context context) { + private Mono> + getValidationDetailsWithResponseAsync(String location, String privateLinkScopeId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (privateLinkScopeId == null) { return Mono @@ -1308,20 +1084,13 @@ private Mono> getValidationDeta } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getValidationDetails( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - privateLinkScopeId, - accept, - context); + return service.getValidationDetails(this.client.getEndpoint(), location, this.client.getApiVersion(), + this.client.getSubscriptionId(), privateLinkScopeId, accept, context); } /** * Returns a Azure Arc PrivateLinkScope's validation details. - * + * * @param location The location of the target resource. * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1330,15 +1099,15 @@ private Mono> getValidationDeta * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getValidationDetailsAsync( - String location, String privateLinkScopeId) { + private Mono getValidationDetailsAsync(String location, + String privateLinkScopeId) { return getValidationDetailsWithResponseAsync(location, privateLinkScopeId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns a Azure Arc PrivateLinkScope's validation details. - * + * * @param location The location of the target resource. * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -1348,14 +1117,14 @@ private Mono getValidationDetailsAsync( * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getValidationDetailsWithResponse( - String location, String privateLinkScopeId, Context context) { + public Response getValidationDetailsWithResponse(String location, + String privateLinkScopeId, Context context) { return getValidationDetailsWithResponseAsync(location, privateLinkScopeId, context).block(); } /** * Returns a Azure Arc PrivateLinkScope's validation details. - * + * * @param location The location of the target resource. * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1370,7 +1139,7 @@ public PrivateLinkScopeValidationDetailsInner getValidationDetails(String locati /** * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1379,19 +1148,15 @@ public PrivateLinkScopeValidationDetailsInner getValidationDetails(String locati * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getValidationDetailsForMachineWithResponseAsync( - String resourceGroupName, String machineName) { + private Mono> + getValidationDetailsForMachineWithResponseAsync(String resourceGroupName, String machineName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1402,23 +1167,15 @@ private Mono> getValidationDeta } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getValidationDetailsForMachine( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - accept, - context)) + .withContext(context -> service.getValidationDetailsForMachine(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, machineName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the target machine to get the private link scope validation details for. * @param context The context to associate with this operation. @@ -1428,19 +1185,15 @@ private Mono> getValidationDeta * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getValidationDetailsForMachineWithResponseAsync( - String resourceGroupName, String machineName, Context context) { + private Mono> + getValidationDetailsForMachineWithResponseAsync(String resourceGroupName, String machineName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1451,20 +1204,13 @@ private Mono> getValidationDeta } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getValidationDetailsForMachine( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - accept, - context); + return service.getValidationDetailsForMachine(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, accept, context); } /** * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1473,15 +1219,15 @@ private Mono> getValidationDeta * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getValidationDetailsForMachineAsync( - String resourceGroupName, String machineName) { + private Mono getValidationDetailsForMachineAsync(String resourceGroupName, + String machineName) { return getValidationDetailsForMachineWithResponseAsync(resourceGroupName, machineName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the target machine to get the private link scope validation details for. * @param context The context to associate with this operation. @@ -1491,14 +1237,14 @@ private Mono getValidationDetailsForMach * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getValidationDetailsForMachineWithResponse( - String resourceGroupName, String machineName, Context context) { + public Response + getValidationDetailsForMachineWithResponse(String resourceGroupName, String machineName, Context context) { return getValidationDetailsForMachineWithResponseAsync(resourceGroupName, machineName, context).block(); } /** * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1507,21 +1253,22 @@ public Response getValidationDetailsForM * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkScopeValidationDetailsInner getValidationDetailsForMachine( - String resourceGroupName, String machineName) { + public PrivateLinkScopeValidationDetailsInner getValidationDetailsForMachine(String resourceGroupName, + String machineName) { return getValidationDetailsForMachineWithResponse(resourceGroupName, machineName, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1529,140 +1276,104 @@ private Mono> listNextSinglePa 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.")); + 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)) + 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 - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink) { + private Mono> + listByResourceGroupNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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)) + .>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 - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list of Azure Arc PrivateLinkScope resources along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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)); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesImpl.java index edbfe6dcaf87..5b4530724f77 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/PrivateLinkScopesImpl.java @@ -13,8 +13,8 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.HybridComputePrivateLinkScopeInner; import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkScopeValidationDetailsInner; import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScope; -import com.azure.resourcemanager.hybridcompute.models.PrivateLinkScopeValidationDetails; import com.azure.resourcemanager.hybridcompute.models.PrivateLinkScopes; +import com.azure.resourcemanager.hybridcompute.models.PrivateLinkScopeValidationDetails; public final class PrivateLinkScopesImpl implements PrivateLinkScopes { private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkScopesImpl.class); @@ -23,8 +23,7 @@ public final class PrivateLinkScopesImpl implements PrivateLinkScopes { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - public PrivateLinkScopesImpl( - PrivateLinkScopesClient innerClient, + public PrivateLinkScopesImpl(PrivateLinkScopesClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -32,24 +31,28 @@ public PrivateLinkScopesImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new HybridComputePrivateLinkScopeImpl(inner1, this.manager())); } public void deleteByResourceGroup(String resourceGroupName, String scopeName) { @@ -60,15 +63,12 @@ public void delete(String resourceGroupName, String scopeName, Context context) this.serviceClient().delete(resourceGroupName, scopeName, context); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String scopeName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, scopeName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String scopeName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, scopeName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new HybridComputePrivateLinkScopeImpl(inner.getValue(), this.manager())); } else { return null; @@ -76,8 +76,8 @@ public Response getByResourceGroupWithResponse( } public HybridComputePrivateLinkScope getByResourceGroup(String resourceGroupName, String scopeName) { - HybridComputePrivateLinkScopeInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, scopeName); + HybridComputePrivateLinkScopeInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, scopeName); if (inner != null) { return new HybridComputePrivateLinkScopeImpl(inner, this.manager()); } else { @@ -85,15 +85,12 @@ public HybridComputePrivateLinkScope getByResourceGroup(String resourceGroupName } } - public Response getValidationDetailsWithResponse( - String location, String privateLinkScopeId, Context context) { - Response inner = - this.serviceClient().getValidationDetailsWithResponse(location, privateLinkScopeId, context); + public Response getValidationDetailsWithResponse(String location, + String privateLinkScopeId, Context context) { + Response inner + = this.serviceClient().getValidationDetailsWithResponse(location, privateLinkScopeId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateLinkScopeValidationDetailsImpl(inner.getValue(), this.manager())); } else { return null; @@ -101,8 +98,8 @@ public Response getValidationDetailsWithRespo } public PrivateLinkScopeValidationDetails getValidationDetails(String location, String privateLinkScopeId) { - PrivateLinkScopeValidationDetailsInner inner = - this.serviceClient().getValidationDetails(location, privateLinkScopeId); + PrivateLinkScopeValidationDetailsInner inner + = this.serviceClient().getValidationDetails(location, privateLinkScopeId); if (inner != null) { return new PrivateLinkScopeValidationDetailsImpl(inner, this.manager()); } else { @@ -110,25 +107,22 @@ public PrivateLinkScopeValidationDetails getValidationDetails(String location, S } } - public Response getValidationDetailsForMachineWithResponse( - String resourceGroupName, String machineName, Context context) { - Response inner = - this.serviceClient().getValidationDetailsForMachineWithResponse(resourceGroupName, machineName, context); + public Response + getValidationDetailsForMachineWithResponse(String resourceGroupName, String machineName, Context context) { + Response inner + = this.serviceClient().getValidationDetailsForMachineWithResponse(resourceGroupName, machineName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateLinkScopeValidationDetailsImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateLinkScopeValidationDetails getValidationDetailsForMachine( - String resourceGroupName, String machineName) { - PrivateLinkScopeValidationDetailsInner inner = - this.serviceClient().getValidationDetailsForMachine(resourceGroupName, machineName); + public PrivateLinkScopeValidationDetails getValidationDetailsForMachine(String resourceGroupName, + String machineName) { + PrivateLinkScopeValidationDetailsInner inner + = this.serviceClient().getValidationDetailsForMachine(resourceGroupName, machineName); if (inner != null) { return new PrivateLinkScopeValidationDetailsImpl(inner, this.manager()); } else { @@ -137,85 +131,57 @@ public PrivateLinkScopeValidationDetails getValidationDetailsForMachine( } public HybridComputePrivateLinkScope getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String scopeName = Utils.getValueFromIdByName(id, "privateLinkScopes"); + String scopeName = ResourceManagerUtils.getValueFromIdByName(id, "privateLinkScopes"); if (scopeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, scopeName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String scopeName = Utils.getValueFromIdByName(id, "privateLinkScopes"); + String scopeName = ResourceManagerUtils.getValueFromIdByName(id, "privateLinkScopes"); if (scopeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, scopeName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String scopeName = Utils.getValueFromIdByName(id, "privateLinkScopes"); + String scopeName = ResourceManagerUtils.getValueFromIdByName(id, "privateLinkScopes"); if (scopeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); } this.delete(resourceGroupName, scopeName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + 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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String scopeName = Utils.getValueFromIdByName(id, "privateLinkScopes"); + String scopeName = ResourceManagerUtils.getValueFromIdByName(id, "privateLinkScopes"); if (scopeName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'privateLinkScopes'.", id))); } this.delete(resourceGroupName, scopeName, context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/Utils.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceManagerUtils.java similarity index 90% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/Utils.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceManagerUtils.java index 9515fe9bd738..98e67dd0e156 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/Utils.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceManagerUtils.java @@ -19,8 +19,8 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { - private Utils() { +final class ResourceManagerUtils { + private ResourceManagerUtils() { } static String getValueFromIdByName(String id, String name) { @@ -87,26 +87,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersClientImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersClientImpl.java index 28a0db812083..0d79e896b51a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersClientImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersClientImpl.java @@ -31,22 +31,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ +/** + * An instance of this class provides access to all the operations defined in ResourceProvidersClient. + */ public final class ResourceProvidersClientImpl implements ResourceProvidersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ResourceProvidersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HybridComputeManagementClientImpl client; /** * Initializes an instance of ResourceProvidersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ResourceProvidersClientImpl(HybridComputeManagementClientImpl client) { - this.service = - RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -57,25 +63,20 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien @Host("{$host}") @ServiceInterface(name = "HybridComputeManagem") public interface ResourceProvidersService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/upgradeExtensions") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> upgradeExtensions( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("machineName") String machineName, + Mono>> upgradeExtensions(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("machineName") String machineName, @BodyParam("application/json") MachineExtensionUpgrade extensionUpgradeParameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -85,19 +86,15 @@ Mono>> upgradeExtensions( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeExtensionsWithResponseAsync( - String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters) { + private Mono>> upgradeExtensionsWithResponseAsync(String resourceGroupName, + String machineName, MachineExtensionUpgrade extensionUpgradeParameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -107,33 +104,22 @@ private Mono>> upgradeExtensionsWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); } if (extensionUpgradeParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter extensionUpgradeParameters is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter extensionUpgradeParameters is required and cannot be null.")); } else { extensionUpgradeParameters.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .upgradeExtensions( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - extensionUpgradeParameters, - accept, - context)) + .withContext(context -> service.upgradeExtensions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, extensionUpgradeParameters, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -144,22 +130,15 @@ private Mono>> upgradeExtensionsWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> upgradeExtensionsWithResponseAsync( - String resourceGroupName, - String machineName, - MachineExtensionUpgrade extensionUpgradeParameters, - Context context) { + private Mono>> upgradeExtensionsWithResponseAsync(String resourceGroupName, + String machineName, MachineExtensionUpgrade extensionUpgradeParameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -169,30 +148,21 @@ private Mono>> upgradeExtensionsWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter machineName is required and cannot be null.")); } if (extensionUpgradeParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter extensionUpgradeParameters is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter extensionUpgradeParameters is required and cannot be null.")); } else { extensionUpgradeParameters.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .upgradeExtensions( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - machineName, - extensionUpgradeParameters, - accept, - context); + return service.upgradeExtensions(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, machineName, extensionUpgradeParameters, accept, + context); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -202,19 +172,17 @@ private Mono>> upgradeExtensionsWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpgradeExtensionsAsync( - String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters) { - Mono>> mono = - upgradeExtensionsWithResponseAsync(resourceGroupName, machineName, extensionUpgradeParameters); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginUpgradeExtensionsAsync(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters) { + Mono>> mono + = upgradeExtensionsWithResponseAsync(resourceGroupName, machineName, extensionUpgradeParameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -225,22 +193,18 @@ private PollerFlux, Void> beginUpgradeExtensionsAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpgradeExtensionsAsync( - String resourceGroupName, - String machineName, - MachineExtensionUpgrade extensionUpgradeParameters, - Context context) { + private PollerFlux, Void> beginUpgradeExtensionsAsync(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - upgradeExtensionsWithResponseAsync(resourceGroupName, machineName, extensionUpgradeParameters, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = upgradeExtensionsWithResponseAsync(resourceGroupName, machineName, extensionUpgradeParameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -250,16 +214,15 @@ private PollerFlux, Void> beginUpgradeExtensionsAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpgradeExtensions( - String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters) { - return this - .beginUpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters) + public SyncPoller, Void> beginUpgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters) { + return this.beginUpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters) .getSyncPoller(); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -270,19 +233,15 @@ public SyncPoller, Void> beginUpgradeExtensions( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpgradeExtensions( - String resourceGroupName, - String machineName, - MachineExtensionUpgrade extensionUpgradeParameters, - Context context) { - return this - .beginUpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters, context) + public SyncPoller, Void> beginUpgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters, Context context) { + return this.beginUpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters, context) .getSyncPoller(); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -292,16 +251,15 @@ public SyncPoller, Void> beginUpgradeExtensions( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeExtensionsAsync( - String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters) { - return beginUpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters) - .last() + private Mono upgradeExtensionsAsync(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters) { + return beginUpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -312,19 +270,15 @@ private Mono upgradeExtensionsAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono upgradeExtensionsAsync( - String resourceGroupName, - String machineName, - MachineExtensionUpgrade extensionUpgradeParameters, - Context context) { - return beginUpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters, context) - .last() + private Mono upgradeExtensionsAsync(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters, Context context) { + return beginUpgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -333,14 +287,14 @@ private Mono upgradeExtensionsAsync( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void upgradeExtensions( - String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters) { + public void upgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters) { upgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters).block(); } /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -350,11 +304,8 @@ public void upgradeExtensions( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void upgradeExtensions( - String resourceGroupName, - String machineName, - MachineExtensionUpgrade extensionUpgradeParameters, - Context context) { + public void upgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters, Context context) { upgradeExtensionsAsync(resourceGroupName, machineName, extensionUpgradeParameters, context).block(); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersImpl.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersImpl.java index cea28dc9778f..87429d49f66f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersImpl.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/ResourceProvidersImpl.java @@ -17,23 +17,19 @@ public final class ResourceProvidersImpl implements ResourceProviders { private final com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager; - public ResourceProvidersImpl( - ResourceProvidersClient innerClient, + public ResourceProvidersImpl(ResourceProvidersClient innerClient, com.azure.resourcemanager.hybridcompute.HybridComputeManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public void upgradeExtensions( - String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters) { + public void upgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters) { this.serviceClient().upgradeExtensions(resourceGroupName, machineName, extensionUpgradeParameters); } - public void upgradeExtensions( - String resourceGroupName, - String machineName, - MachineExtensionUpgrade extensionUpgradeParameters, - Context context) { + public void upgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters, Context context) { this.serviceClient().upgradeExtensions(resourceGroupName, machineName, extensionUpgradeParameters, context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/package-info.java index dcca713ae6c8..a34c446310d8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for HybridComputeManagementClient. The Hybrid Compute Management Client. */ +/** + * Package containing the implementations for HybridComputeManagementClient. + * The Hybrid Compute Management Client. + */ package com.azure.resourcemanager.hybridcompute.implementation; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRule.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRule.java new file mode 100644 index 000000000000..7f265dd3ba40 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRule.java @@ -0,0 +1,81 @@ +// 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.resourcemanager.hybridcompute.fluent.models.AccessRuleProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Access rule. + */ +@Immutable +public final class AccessRule { + /* + * Name of the access rule. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Access rule properties + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private AccessRuleProperties innerProperties; + + /** + * Creates an instance of AccessRule class. + */ + public AccessRule() { + } + + /** + * Get the name property: Name of the access rule. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the innerProperties property: Access rule properties. + * + * @return the innerProperties value. + */ + private AccessRuleProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the direction property: Direction of the access rule. + * + * @return the direction value. + */ + public AccessRuleDirection direction() { + return this.innerProperties() == null ? null : this.innerProperties().direction(); + } + + /** + * Get the addressPrefixes property: Address prefixes that are allowed access. + * + * @return the addressPrefixes value. + */ + public List addressPrefixes() { + return this.innerProperties() == null ? null : this.innerProperties().addressPrefixes(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRuleDirection.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRuleDirection.java new file mode 100644 index 000000000000..547facf4b1e8 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AccessRuleDirection.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Indicates direction of an access rule. + */ +public final class AccessRuleDirection extends ExpandableStringEnum { + /** + * Static value Inbound for AccessRuleDirection. + */ + public static final AccessRuleDirection INBOUND = fromString("Inbound"); + + /** + * Static value Outbound for AccessRuleDirection. + */ + public static final AccessRuleDirection OUTBOUND = fromString("Outbound"); + + /** + * Creates a new instance of AccessRuleDirection value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccessRuleDirection() { + } + + /** + * Creates or finds a AccessRuleDirection from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccessRuleDirection. + */ + @JsonCreator + public static AccessRuleDirection fromString(String name) { + return fromString(name, AccessRuleDirection.class); + } + + /** + * Gets known AccessRuleDirection values. + * + * @return known AccessRuleDirection values. + */ + public static Collection values() { + return values(AccessRuleDirection.class); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfiguration.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfiguration.java index ac3b543a3ed2..7b14a3e11195 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfiguration.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfiguration.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. */ +/** + * Configurable properties that the user can set locally via the azcmagent config command, or remotely via ARM. + */ @Immutable public final class AgentConfiguration { /* @@ -54,19 +56,20 @@ public final class AgentConfiguration { private String guestConfigurationEnabled; /* - * Name of configuration mode to use. Modes are pre-defined configurations of security controls, extension - * allowlists and guest configuration, maintained by Microsoft. + * Name of configuration mode to use. Modes are pre-defined configurations of security controls, extension allowlists and guest configuration, maintained by Microsoft. */ @JsonProperty(value = "configMode", access = JsonProperty.Access.WRITE_ONLY) private AgentConfigurationMode configMode; - /** Creates an instance of AgentConfiguration class. */ + /** + * Creates an instance of AgentConfiguration class. + */ public AgentConfiguration() { } /** * Get the proxyUrl property: Specifies the URL of the proxy to be used. - * + * * @return the proxyUrl value. */ public String proxyUrl() { @@ -75,7 +78,7 @@ public String proxyUrl() { /** * Get the incomingConnectionsPorts property: Specifies the list of ports that the agent will be able to listen on. - * + * * @return the incomingConnectionsPorts value. */ public List incomingConnectionsPorts() { @@ -84,7 +87,7 @@ public List incomingConnectionsPorts() { /** * Get the extensionsAllowList property: Array of extensions that are allowed to be installed or updated. - * + * * @return the extensionsAllowList value. */ public List extensionsAllowList() { @@ -93,7 +96,7 @@ public List extensionsAllowList() { /** * Get the extensionsBlockList property: Array of extensions that are blocked (cannot be installed or updated). - * + * * @return the extensionsBlockList value. */ public List extensionsBlockList() { @@ -102,7 +105,7 @@ public List extensionsBlockList() { /** * Get the proxyBypass property: List of service names which should not use the specified proxy server. - * + * * @return the proxyBypass value. */ public List proxyBypass() { @@ -111,7 +114,7 @@ public List proxyBypass() { /** * Get the extensionsEnabled property: Specifies whether the extension service is enabled or disabled. - * + * * @return the extensionsEnabled value. */ public String extensionsEnabled() { @@ -121,7 +124,7 @@ public String extensionsEnabled() { /** * Get the guestConfigurationEnabled property: Specified whether the guest configuration service is enabled or * disabled. - * + * * @return the guestConfigurationEnabled value. */ public String guestConfigurationEnabled() { @@ -131,7 +134,7 @@ public String guestConfigurationEnabled() { /** * Get the configMode property: Name of configuration mode to use. Modes are pre-defined configurations of security * controls, extension allowlists and guest configuration, maintained by Microsoft. - * + * * @return the configMode value. */ public AgentConfigurationMode configMode() { @@ -140,7 +143,7 @@ public AgentConfigurationMode configMode() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfigurationMode.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfigurationMode.java index 5d9bfbdbe5ce..9db82a41cb3a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfigurationMode.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentConfigurationMode.java @@ -13,15 +13,19 @@ * and guest configuration, maintained by Microsoft. */ public final class AgentConfigurationMode extends ExpandableStringEnum { - /** Static value full for AgentConfigurationMode. */ + /** + * Static value full for AgentConfigurationMode. + */ public static final AgentConfigurationMode FULL = fromString("full"); - /** Static value monitor for AgentConfigurationMode. */ + /** + * Static value monitor for AgentConfigurationMode. + */ public static final AgentConfigurationMode MONITOR = fromString("monitor"); /** * Creates a new instance of AgentConfigurationMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +34,7 @@ public AgentConfigurationMode() { /** * Creates or finds a AgentConfigurationMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding AgentConfigurationMode. */ @@ -41,7 +45,7 @@ public static AgentConfigurationMode fromString(String name) { /** * Gets known AgentConfigurationMode values. - * + * * @return known AgentConfigurationMode values. */ public static Collection values() { 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 e97b7b883450..a95ebfa94074 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 @@ -6,8 +6,12 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.UUID; -/** The info w.r.t Agent Upgrade. */ +/** + * The info w.r.t Agent Upgrade. + */ @Fluent public final class AgentUpgrade { /* @@ -20,7 +24,7 @@ public final class AgentUpgrade { * The correlation ID passed in from RSM per upgrade. */ @JsonProperty(value = "correlationId") - private String correlationId; + private UUID correlationId; /* * Specifies if RSM should try to upgrade this machine @@ -38,7 +42,7 @@ public final class AgentUpgrade { * Timestamp of last upgrade attempt */ @JsonProperty(value = "lastAttemptTimestamp", access = JsonProperty.Access.WRITE_ONLY) - private String lastAttemptTimestamp; + private OffsetDateTime lastAttemptTimestamp; /* * Specifies the status of Agent Upgrade. @@ -52,13 +56,15 @@ public final class AgentUpgrade { @JsonProperty(value = "lastAttemptMessage", access = JsonProperty.Access.WRITE_ONLY) private String lastAttemptMessage; - /** Creates an instance of AgentUpgrade class. */ + /** + * Creates an instance of AgentUpgrade class. + */ public AgentUpgrade() { } /** * Get the desiredVersion property: Specifies the version info w.r.t AgentUpgrade for the machine. - * + * * @return the desiredVersion value. */ public String desiredVersion() { @@ -67,7 +73,7 @@ public String desiredVersion() { /** * Set the desiredVersion property: Specifies the version info w.r.t AgentUpgrade for the machine. - * + * * @param desiredVersion the desiredVersion value to set. * @return the AgentUpgrade object itself. */ @@ -78,27 +84,27 @@ public AgentUpgrade withDesiredVersion(String desiredVersion) { /** * Get the correlationId property: The correlation ID passed in from RSM per upgrade. - * + * * @return the correlationId value. */ - public String correlationId() { + public UUID correlationId() { return this.correlationId; } /** * Set the correlationId property: The correlation ID passed in from RSM per upgrade. - * + * * @param correlationId the correlationId value to set. * @return the AgentUpgrade object itself. */ - public AgentUpgrade withCorrelationId(String correlationId) { + public AgentUpgrade withCorrelationId(UUID correlationId) { this.correlationId = correlationId; return this; } /** * Get the enableAutomaticUpgrade property: Specifies if RSM should try to upgrade this machine. - * + * * @return the enableAutomaticUpgrade value. */ public Boolean enableAutomaticUpgrade() { @@ -107,7 +113,7 @@ public Boolean enableAutomaticUpgrade() { /** * Set the enableAutomaticUpgrade property: Specifies if RSM should try to upgrade this machine. - * + * * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. * @return the AgentUpgrade object itself. */ @@ -118,7 +124,7 @@ public AgentUpgrade withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { /** * Get the lastAttemptDesiredVersion property: Specifies the version of the last attempt. - * + * * @return the lastAttemptDesiredVersion value. */ public String lastAttemptDesiredVersion() { @@ -127,16 +133,16 @@ public String lastAttemptDesiredVersion() { /** * Get the lastAttemptTimestamp property: Timestamp of last upgrade attempt. - * + * * @return the lastAttemptTimestamp value. */ - public String lastAttemptTimestamp() { + public OffsetDateTime lastAttemptTimestamp() { return this.lastAttemptTimestamp; } /** * Get the lastAttemptStatus property: Specifies the status of Agent Upgrade. - * + * * @return the lastAttemptStatus value. */ public LastAttemptStatusEnum lastAttemptStatus() { @@ -145,7 +151,7 @@ public LastAttemptStatusEnum lastAttemptStatus() { /** * Get the lastAttemptMessage property: Failure message of last upgrade attempt if any. - * + * * @return the lastAttemptMessage value. */ public String lastAttemptMessage() { @@ -154,7 +160,7 @@ public String lastAttemptMessage() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersion.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersion.java deleted file mode 100644 index 9ffee7c7211f..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersion.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionInner; - -/** An immutable client-side representation of AgentVersion. */ -public interface AgentVersion { - /** - * Gets the agentVersion property: Represents the agent version. - * - * @return the agentVersion value. - */ - String agentVersion(); - - /** - * Gets the downloadLink property: Represents the download link of specific agent version. - * - * @return the downloadLink value. - */ - String downloadLink(); - - /** - * Gets the osType property: Defines the os type. - * - * @return the osType value. - */ - String osType(); - - /** - * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionInner object. - * - * @return the inner object. - */ - AgentVersionInner innerModel(); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersions.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersions.java deleted file mode 100644 index f5130c9a4caa..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersions.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of AgentVersions. */ -public interface AgentVersions { - /** - * Gets all Agent Versions along with the download link currently present. - * - * @param osType Defines the os type. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Agent Versions along with the download link currently present along with {@link Response}. - */ - Response listWithResponse(String osType, Context context); - - /** - * Gets all Agent Versions along with the download link currently present. - * - * @param osType Defines the os type. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Agent Versions along with the download link currently present. - */ - AgentVersionsList list(String osType); - - /** - * Gets an Agent Version along with the download link currently present. - * - * @param osType Defines the os type. - * @param version Defines the agent version. To get latest, use latest or else a specific agent version. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Agent Version along with the download link currently present along with {@link Response}. - */ - Response getWithResponse(String osType, String version, Context context); - - /** - * Gets an Agent Version along with the download link currently present. - * - * @param osType Defines the os type. - * @param version Defines the agent version. To get latest, use latest or else a specific agent version. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Agent Version along with the download link currently present. - */ - AgentVersion get(String osType, String version); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersionsList.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersionsList.java deleted file mode 100644 index 1fff796c284e..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AgentVersionsList.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionsListInner; -import java.util.List; - -/** An immutable client-side representation of AgentVersionsList. */ -public interface AgentVersionsList { - /** - * Gets the value property: The list of available Agent Versions. - * - * @return the value value. - */ - List value(); - - /** - * Gets the nextLink property: The URI to fetch the next 10 available Agent Versions. - * - * @return the nextLink value. - */ - String nextLink(); - - /** - * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionsListInner object. - * - * @return the inner object. - */ - AgentVersionsListInner innerModel(); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ArcKindEnum.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ArcKindEnum.java index 89f9ce9ba1a3..988c7b893431 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ArcKindEnum.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ArcKindEnum.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. */ +/** + * Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. + */ public final class ArcKindEnum extends ExpandableStringEnum { - /** Static value AVS for ArcKindEnum. */ + /** + * Static value AVS for ArcKindEnum. + */ public static final ArcKindEnum AVS = fromString("AVS"); - /** Static value HCI for ArcKindEnum. */ + /** + * Static value HCI for ArcKindEnum. + */ public static final ArcKindEnum HCI = fromString("HCI"); - /** Static value SCVMM for ArcKindEnum. */ + /** + * Static value SCVMM for ArcKindEnum. + */ public static final ArcKindEnum SCVMM = fromString("SCVMM"); - /** Static value VMware for ArcKindEnum. */ + /** + * Static value VMware for ArcKindEnum. + */ public static final ArcKindEnum VMWARE = fromString("VMware"); - /** Static value EPS for ArcKindEnum. */ + /** + * Static value EPS for ArcKindEnum. + */ public static final ArcKindEnum EPS = fromString("EPS"); - /** Static value GCP for ArcKindEnum. */ + /** + * Static value GCP for ArcKindEnum. + */ public static final ArcKindEnum GCP = fromString("GCP"); - /** Static value AWS for ArcKindEnum. */ + /** + * Static value AWS for ArcKindEnum. + */ public static final ArcKindEnum AWS = fromString("AWS"); /** * Creates a new instance of ArcKindEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public ArcKindEnum() { /** * Creates or finds a ArcKindEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding ArcKindEnum. */ @@ -53,7 +69,7 @@ public static ArcKindEnum fromString(String name) { /** * Gets known ArcKindEnum values. - * + * * @return known ArcKindEnum values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AssessmentModeTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AssessmentModeTypes.java index 8ecd309c1751..3cc5176c36ce 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AssessmentModeTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AssessmentModeTypes.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Specifies the assessment mode. */ +/** + * Specifies the assessment mode. + */ public final class AssessmentModeTypes extends ExpandableStringEnum { - /** Static value ImageDefault for AssessmentModeTypes. */ + /** + * Static value ImageDefault for AssessmentModeTypes. + */ public static final AssessmentModeTypes IMAGE_DEFAULT = fromString("ImageDefault"); - /** Static value AutomaticByPlatform for AssessmentModeTypes. */ + /** + * Static value AutomaticByPlatform for AssessmentModeTypes. + */ public static final AssessmentModeTypes AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); /** * Creates a new instance of AssessmentModeTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AssessmentModeTypes() { /** * Creates or finds a AssessmentModeTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding AssessmentModeTypes. */ @@ -38,7 +44,7 @@ public static AssessmentModeTypes fromString(String name) { /** * Gets known AssessmentModeTypes values. - * + * * @return known AssessmentModeTypes values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AvailablePatchCountByClassification.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AvailablePatchCountByClassification.java index 5f1fa82df678..83d5867e786f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AvailablePatchCountByClassification.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/AvailablePatchCountByClassification.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Summarization of patches available for installation on the machine by classification. */ +/** + * Summarization of patches available for installation on the machine by classification. + */ @Immutable public final class AvailablePatchCountByClassification { /* @@ -64,13 +66,15 @@ public final class AvailablePatchCountByClassification { @JsonProperty(value = "other", access = JsonProperty.Access.WRITE_ONLY) private Integer other; - /** Creates an instance of AvailablePatchCountByClassification class. */ + /** + * Creates an instance of AvailablePatchCountByClassification class. + */ public AvailablePatchCountByClassification() { } /** * Get the security property: Number of security patches available for installation. - * + * * @return the security value. */ public Integer security() { @@ -79,7 +83,7 @@ public Integer security() { /** * Get the critical property: Number of critical patches available for installation. - * + * * @return the critical value. */ public Integer critical() { @@ -88,7 +92,7 @@ public Integer critical() { /** * Get the definition property: Number of definition patches available for installation. - * + * * @return the definition value. */ public Integer definition() { @@ -97,7 +101,7 @@ public Integer definition() { /** * Get the updateRollup property: Number of update Rollup patches available for installation. - * + * * @return the updateRollup value. */ public Integer updateRollup() { @@ -106,7 +110,7 @@ public Integer updateRollup() { /** * Get the featurePack property: Number of feature pack patches available for installation. - * + * * @return the featurePack value. */ public Integer featurePack() { @@ -115,7 +119,7 @@ public Integer featurePack() { /** * Get the servicePack property: Number of service pack patches available for installation. - * + * * @return the servicePack value. */ public Integer servicePack() { @@ -124,7 +128,7 @@ public Integer servicePack() { /** * Get the tools property: Number of tools patches available for installation. - * + * * @return the tools value. */ public Integer tools() { @@ -133,7 +137,7 @@ public Integer tools() { /** * Get the updates property: Number of updates category patches available for installation. - * + * * @return the updates value. */ public Integer updates() { @@ -142,7 +146,7 @@ public Integer updates() { /** * Get the other property: Number of other patches available for installation. - * + * * @return the other value. */ public Integer other() { @@ -151,7 +155,7 @@ public Integer other() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/CloudMetadata.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/CloudMetadata.java index ac65d2743e4f..6168e5b74463 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/CloudMetadata.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/CloudMetadata.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The metadata of the cloud environment (Azure/GCP/AWS/OCI...). */ +/** + * The metadata of the cloud environment (Azure/GCP/AWS/OCI...). + */ @Immutable public final class CloudMetadata { /* @@ -16,13 +18,15 @@ public final class CloudMetadata { @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; - /** Creates an instance of CloudMetadata class. */ + /** + * Creates an instance of CloudMetadata class. + */ public CloudMetadata() { } /** * Get the provider property: Specifies the cloud provider (Azure/AWS/GCP...). - * + * * @return the provider value. */ public String provider() { @@ -31,7 +35,7 @@ public String provider() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConfigurationExtension.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConfigurationExtension.java index 096d36407fd9..cc742b4dbe83 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConfigurationExtension.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConfigurationExtension.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes properties that can identify extensions. */ +/** + * Describes properties that can identify extensions. + */ @Immutable public final class ConfigurationExtension { /* @@ -22,13 +24,15 @@ public final class ConfigurationExtension { @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) private String type; - /** Creates an instance of ConfigurationExtension class. */ + /** + * Creates an instance of ConfigurationExtension class. + */ public ConfigurationExtension() { } /** * Get the publisher property: Publisher of the extension. - * + * * @return the publisher value. */ public String publisher() { @@ -37,7 +41,7 @@ public String publisher() { /** * Get the type property: Type of the extension. - * + * * @return the type value. */ public String type() { @@ -46,7 +50,7 @@ public String type() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConnectionDetail.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConnectionDetail.java index 55b3c5b65923..9958d047f0c0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConnectionDetail.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ConnectionDetail.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ConnectionDetail model. */ +/** + * The ConnectionDetail model. + */ @Immutable public final class ConnectionDetail { /* @@ -40,13 +42,15 @@ public final class ConnectionDetail { @JsonProperty(value = "memberName", access = JsonProperty.Access.WRITE_ONLY) private String memberName; - /** Creates an instance of ConnectionDetail class. */ + /** + * Creates an instance of ConnectionDetail class. + */ public ConnectionDetail() { } /** * Get the id property: Azure resource Id. - * + * * @return the id value. */ public String id() { @@ -55,7 +59,7 @@ public String id() { /** * Get the privateIpAddress property: The private endpoint connection private ip address. - * + * * @return the privateIpAddress value. */ public String privateIpAddress() { @@ -64,7 +68,7 @@ public String privateIpAddress() { /** * Get the linkIdentifier property: The private endpoint connection link identifier. - * + * * @return the linkIdentifier value. */ public String linkIdentifier() { @@ -73,7 +77,7 @@ public String linkIdentifier() { /** * Get the groupId property: The private endpoint connection group id. - * + * * @return the groupId value. */ public String groupId() { @@ -82,7 +86,7 @@ public String groupId() { /** * Get the memberName property: The private endpoint connection member name. - * + * * @return the memberName value. */ public String memberName() { @@ -91,7 +95,7 @@ public String memberName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuEligibility.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuEligibility.java index f2f02889938b..c0685dde9916 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuEligibility.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuEligibility.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The ESU eligibility. */ +/** + * The ESU eligibility. + */ public final class EsuEligibility extends ExpandableStringEnum { - /** Static value Eligible for EsuEligibility. */ + /** + * Static value Eligible for EsuEligibility. + */ public static final EsuEligibility ELIGIBLE = fromString("Eligible"); - /** Static value Ineligible for EsuEligibility. */ + /** + * Static value Ineligible for EsuEligibility. + */ public static final EsuEligibility INELIGIBLE = fromString("Ineligible"); - /** Static value Unknown for EsuEligibility. */ + /** + * Static value Unknown for EsuEligibility. + */ public static final EsuEligibility UNKNOWN = fromString("Unknown"); /** * Creates a new instance of EsuEligibility value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public EsuEligibility() { /** * Creates or finds a EsuEligibility from its string representation. - * + * * @param name a name to look for. * @return the corresponding EsuEligibility. */ @@ -41,7 +49,7 @@ public static EsuEligibility fromString(String name) { /** * Gets known EsuEligibility values. - * + * * @return known EsuEligibility values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKey.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKey.java index 47f03b619bf8..9088f358fc41 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKey.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKey.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** ESU key. */ +/** + * ESU key. + */ @Fluent public final class EsuKey { /* @@ -22,13 +24,15 @@ public final class EsuKey { @JsonProperty(value = "licenseStatus") private String licenseStatus; - /** Creates an instance of EsuKey class. */ + /** + * Creates an instance of EsuKey class. + */ public EsuKey() { } /** * Get the sku property: SKU number. - * + * * @return the sku value. */ public String sku() { @@ -37,7 +41,7 @@ public String sku() { /** * Set the sku property: SKU number. - * + * * @param sku the sku value to set. * @return the EsuKey object itself. */ @@ -48,7 +52,7 @@ public EsuKey withSku(String sku) { /** * Get the licenseStatus property: The current status of the license profile key. - * + * * @return the licenseStatus value. */ public String licenseStatus() { @@ -57,7 +61,7 @@ public String licenseStatus() { /** * Set the licenseStatus property: The current status of the license profile key. - * + * * @param licenseStatus the licenseStatus value to set. * @return the EsuKey object itself. */ @@ -68,7 +72,7 @@ public EsuKey withLicenseStatus(String licenseStatus) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKeyState.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKeyState.java index fdc7c71b386e..81b8f297b217 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKeyState.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuKeyState.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The ESU key state. */ +/** + * The ESU key state. + */ public final class EsuKeyState extends ExpandableStringEnum { - /** Static value Inactive for EsuKeyState. */ + /** + * Static value Inactive for EsuKeyState. + */ public static final EsuKeyState INACTIVE = fromString("Inactive"); - /** Static value Active for EsuKeyState. */ + /** + * Static value Active for EsuKeyState. + */ public static final EsuKeyState ACTIVE = fromString("Active"); /** * Creates a new instance of EsuKeyState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EsuKeyState() { /** * Creates or finds a EsuKeyState from its string representation. - * + * * @param name a name to look for. * @return the corresponding EsuKeyState. */ @@ -38,7 +44,7 @@ public static EsuKeyState fromString(String name) { /** * Gets known EsuKeyState values. - * + * * @return known EsuKeyState values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuServerType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuServerType.java index 183e95c8d56e..0d2b886979b8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuServerType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/EsuServerType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The server types for Esu. */ +/** + * The server types for Esu. + */ public final class EsuServerType extends ExpandableStringEnum { - /** Static value Standard for EsuServerType. */ + /** + * Static value Standard for EsuServerType. + */ public static final EsuServerType STANDARD = fromString("Standard"); - /** Static value Datacenter for EsuServerType. */ + /** + * Static value Datacenter for EsuServerType. + */ public static final EsuServerType DATACENTER = fromString("Datacenter"); /** * Creates a new instance of EsuServerType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public EsuServerType() { /** * Creates or finds a EsuServerType from its string representation. - * + * * @param name a name to look for. * @return the corresponding EsuServerType. */ @@ -38,7 +44,7 @@ public static EsuServerType fromString(String name) { /** * Gets known EsuServerType values. - * + * * @return known EsuServerType values. */ public static Collection values() { 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 000000000000..4504ceb13e22 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExecutionState.java @@ -0,0 +1,78 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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/ExtensionMetadatas.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadatas.java index 9c2700b10528..f92df4b1a786 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadatas.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionMetadatas.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ExtensionMetadatas. */ +/** + * Resource collection API of ExtensionMetadatas. + */ public interface ExtensionMetadatas { /** * Gets an Extension Metadata based on location, publisher, extensionType and version. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -21,15 +23,15 @@ public interface ExtensionMetadatas { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Extension Metadata based on location, publisher, extensionType and version along with {@link - * Response}. + * @return an Extension Metadata based on location, publisher, extensionType and version along with + * {@link Response}. */ - Response getWithResponse( - String location, String publisher, String extensionType, String version, Context context); + Response getWithResponse(String location, String publisher, String extensionType, String version, + Context context); /** * Gets an Extension Metadata based on location, publisher, extensionType and version. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -43,21 +45,21 @@ Response getWithResponse( /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType as paginated response with {@link - * PagedIterable}. + * @return all Extension versions based on location, publisher, extensionType as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String location, String publisher, String extensionType); /** * Gets all Extension versions based on location, publisher, extensionType. - * + * * @param location The location of the Extension being received. * @param publisher The publisher of the Extension being received. * @param extensionType The extensionType of the Extension being received. @@ -65,8 +67,8 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all Extension versions based on location, publisher, extensionType as paginated response with {@link - * PagedIterable}. + * @return all Extension versions based on location, publisher, extensionType as paginated response with + * {@link PagedIterable}. */ PagedIterable list(String location, String publisher, String extensionType, Context context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTargetProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTargetProperties.java index a7c0c522490e..684a08ab0126 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTargetProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionTargetProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the Machine Extension Target Version Properties. */ +/** + * Describes the Machine Extension Target Version Properties. + */ @Fluent public final class ExtensionTargetProperties { /* @@ -16,13 +18,15 @@ public final class ExtensionTargetProperties { @JsonProperty(value = "targetVersion") private String targetVersion; - /** Creates an instance of ExtensionTargetProperties class. */ + /** + * Creates an instance of ExtensionTargetProperties class. + */ public ExtensionTargetProperties() { } /** * Get the targetVersion property: Properties for the specified Extension to Upgrade. - * + * * @return the targetVersion value. */ public String targetVersion() { @@ -31,7 +35,7 @@ public String targetVersion() { /** * Set the targetVersion property: Properties for the specified Extension to Upgrade. - * + * * @param targetVersion the targetVersion value to set. * @return the ExtensionTargetProperties object itself. */ @@ -42,7 +46,7 @@ public ExtensionTargetProperties withTargetVersion(String targetVersion) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValue.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValue.java index 1538a450b3c1..39a27495c17e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValue.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValue.java @@ -7,60 +7,62 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueInner; -/** An immutable client-side representation of ExtensionValue. */ +/** + * An immutable client-side representation of ExtensionValue. + */ public interface ExtensionValue { /** * 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 version property: The version of the Extension being received. - * + * * @return the version value. */ String version(); /** * Gets the extensionType property: The type of the Extension being received. - * + * * @return the extensionType value. */ String extensionType(); /** * Gets the publisher property: The publisher of the Extension being received. - * + * * @return the publisher value. */ String publisher(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.ExtensionValueInner object. - * + * * @return the inner object. */ ExtensionValueInner innerModel(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResult.java index c773218ee9aa..26d20632a27c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionValueListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The List Extension Metadata response. */ +/** + * The List Extension Metadata response. + */ @Immutable public final class ExtensionValueListResult { /* @@ -18,13 +20,15 @@ public final class ExtensionValueListResult { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; - /** Creates an instance of ExtensionValueListResult class. */ + /** + * Creates an instance of ExtensionValueListResult class. + */ public ExtensionValueListResult() { } /** * Get the value property: The list of extension metadata. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 000000000000..6a534dab9d21 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsResourceStatus.java @@ -0,0 +1,159 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Instance view status. + */ +@Fluent +public final class ExtensionsResourceStatus { + /* + * The status code. + */ + @JsonProperty(value = "code") + private String code; + + /* + * The level code. + */ + @JsonProperty(value = "level") + private ExtensionsStatusLevelTypes level; + + /* + * The short localizable label for the status. + */ + @JsonProperty(value = "displayStatus") + private String displayStatus; + + /* + * The detailed status message, including for alerts and error messages. + */ + @JsonProperty(value = "message") + private String message; + + /* + * The time of the status. + */ + @JsonProperty(value = "time") + 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() { + } +} 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 000000000000..1d9d7e545d24 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ExtensionsStatusLevelTypes.java @@ -0,0 +1,66 @@ +// 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.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * 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. + */ + @JsonCreator + 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} + */ + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScope.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScope.java index adfad17518b2..a739225973cf 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScope.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScope.java @@ -10,104 +10,111 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.HybridComputePrivateLinkScopeInner; import java.util.Map; -/** An immutable client-side representation of HybridComputePrivateLinkScope. */ +/** + * An immutable client-side representation of HybridComputePrivateLinkScope. + */ public interface HybridComputePrivateLinkScope { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the properties property: Properties that define a Azure Arc PrivateLinkScope resource. - * + * * @return the properties value. */ HybridComputePrivateLinkScopeProperties properties(); /** * Gets the systemData property: The system meta data relating to this resource. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.HybridComputePrivateLinkScopeInner object. - * + * * @return the inner object. */ HybridComputePrivateLinkScopeInner innerModel(); - /** The entirety of the HybridComputePrivateLinkScope definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the HybridComputePrivateLinkScope definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The HybridComputePrivateLinkScope definition stages. */ + /** + * The HybridComputePrivateLinkScope definition stages. + */ interface DefinitionStages { - /** The first stage of the HybridComputePrivateLinkScope definition. */ + /** + * The first stage of the HybridComputePrivateLinkScope definition. + */ interface Blank extends WithLocation { } - /** The stage of the HybridComputePrivateLinkScope definition allowing to specify location. */ + /** + * The stage of the HybridComputePrivateLinkScope 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. */ @@ -115,18 +122,20 @@ interface WithLocation { /** * 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 HybridComputePrivateLinkScope definition allowing to specify parent resource. */ + /** + * The stage of the HybridComputePrivateLinkScope 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. */ @@ -140,36 +149,40 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ HybridComputePrivateLinkScope create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ HybridComputePrivateLinkScope create(Context context); } - /** The stage of the HybridComputePrivateLinkScope definition allowing to specify tags. */ + /** + * The stage of the HybridComputePrivateLinkScope 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 HybridComputePrivateLinkScope definition allowing to specify properties. */ + /** + * The stage of the HybridComputePrivateLinkScope definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Properties that define a Azure Arc PrivateLinkScope resource.. - * + * * @param properties Properties that define a Azure Arc PrivateLinkScope resource. * @return the next definition stage. */ @@ -179,36 +192,42 @@ interface WithProperties { /** * Begins update for the HybridComputePrivateLinkScope resource. - * + * * @return the stage of resource update. */ HybridComputePrivateLinkScope.Update update(); - /** The template for HybridComputePrivateLinkScope update. */ + /** + * The template for HybridComputePrivateLinkScope update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ HybridComputePrivateLinkScope apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ HybridComputePrivateLinkScope apply(Context context); } - /** The HybridComputePrivateLinkScope update stages. */ + /** + * The HybridComputePrivateLinkScope update stages. + */ interface UpdateStages { - /** The stage of the HybridComputePrivateLinkScope update allowing to specify tags. */ + /** + * The stage of the HybridComputePrivateLinkScope update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -218,14 +237,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ HybridComputePrivateLinkScope refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeListResult.java index b17ac74d92c4..0176dcdc9554 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the list of Azure Arc PrivateLinkScope resources. */ +/** + * Describes the list of Azure Arc PrivateLinkScope resources. + */ @Fluent public final class HybridComputePrivateLinkScopeListResult { /* @@ -20,19 +22,20 @@ public final class HybridComputePrivateLinkScopeListResult { private List value; /* - * The URI to get the next set of Azure Arc PrivateLinkScope definitions if too many PrivateLinkScopes where - * returned in the result set. + * The URI to get the next set of Azure Arc PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the result set. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of HybridComputePrivateLinkScopeListResult class. */ + /** + * Creates an instance of HybridComputePrivateLinkScopeListResult class. + */ public HybridComputePrivateLinkScopeListResult() { } /** * Get the value property: List of Azure Arc PrivateLinkScope definitions. - * + * * @return the value value. */ public List value() { @@ -41,7 +44,7 @@ public List value() { /** * Set the value property: List of Azure Arc PrivateLinkScope definitions. - * + * * @param value the value value to set. * @return the HybridComputePrivateLinkScopeListResult object itself. */ @@ -53,7 +56,7 @@ public HybridComputePrivateLinkScopeListResult withValue(List e.validate()); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeProperties.java index c21577f80bc2..bdbdb514f3ea 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridComputePrivateLinkScopeProperties.java @@ -8,20 +8,19 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties that define a Azure Arc PrivateLinkScope resource. */ +/** + * Properties that define a Azure Arc PrivateLinkScope resource. + */ @Fluent public final class HybridComputePrivateLinkScopeProperties { /* - * Indicates whether machines associated with the private link scope can also use public Azure Arc service - * endpoints. + * Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. */ @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccessType publicNetworkAccess; /* - * Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it is - * defined. Users cannot change this value but are able to read from it. Values will include Provisioning - * ,Succeeded, Canceled and Failed. + * Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; @@ -38,14 +37,16 @@ public final class HybridComputePrivateLinkScopeProperties { @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; - /** Creates an instance of HybridComputePrivateLinkScopeProperties class. */ + /** + * Creates an instance of HybridComputePrivateLinkScopeProperties class. + */ public HybridComputePrivateLinkScopeProperties() { } /** * Get the publicNetworkAccess property: Indicates whether machines associated with the private link scope can also * use public Azure Arc service endpoints. - * + * * @return the publicNetworkAccess value. */ public PublicNetworkAccessType publicNetworkAccess() { @@ -55,12 +56,12 @@ public PublicNetworkAccessType publicNetworkAccess() { /** * Set the publicNetworkAccess property: Indicates whether machines associated with the private link scope can also * use public Azure Arc service endpoints. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the HybridComputePrivateLinkScopeProperties object itself. */ - public HybridComputePrivateLinkScopeProperties withPublicNetworkAccess( - PublicNetworkAccessType publicNetworkAccess) { + public HybridComputePrivateLinkScopeProperties + withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { this.publicNetworkAccess = publicNetworkAccess; return this; } @@ -69,7 +70,7 @@ public HybridComputePrivateLinkScopeProperties withPublicNetworkAccess( * Get the provisioningState property: Current state of this PrivateLinkScope: whether or not is has been * provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. * Values will include Provisioning ,Succeeded, Canceled and Failed. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -78,7 +79,7 @@ public String provisioningState() { /** * Get the privateLinkScopeId property: The Guid id of the private link scope. - * + * * @return the privateLinkScopeId value. */ public String privateLinkScopeId() { @@ -87,7 +88,7 @@ public String privateLinkScopeId() { /** * Get the privateEndpointConnections property: The collection of associated Private Endpoint Connections. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -96,7 +97,7 @@ public List privateEndpointConnections() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadata.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadata.java deleted file mode 100644 index b23904785669..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadata.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.hybridcompute.fluent.models.HybridIdentityMetadataInner; - -/** An immutable client-side representation of HybridIdentityMetadata. */ -public interface HybridIdentityMetadata { - /** - * 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 vmId property: The unique identifier for the resource. - * - * @return the vmId value. - */ - String vmId(); - - /** - * Gets the publicKey property: The Public Key. - * - * @return the publicKey value. - */ - String publicKey(); - - /** - * Gets the identity property: Identity for the resource. - * - * @return the identity value. - */ - Identity identity(); - - /** - * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.HybridIdentityMetadataInner object. - * - * @return the inner object. - */ - HybridIdentityMetadataInner innerModel(); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadataList.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadataList.java deleted file mode 100644 index def911a18a08..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadataList.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hybridcompute.fluent.models.HybridIdentityMetadataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of HybridIdentityMetadata. */ -@Fluent -public final class HybridIdentityMetadataList { - /* - * Url to follow for getting next page of HybridIdentityMetadata. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * Array of HybridIdentityMetadata - */ - @JsonProperty(value = "value", required = true) - private List value; - - /** Creates an instance of HybridIdentityMetadataList class. */ - public HybridIdentityMetadataList() { - } - - /** - * Get the nextLink property: Url to follow for getting next page of HybridIdentityMetadata. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Url to follow for getting next page of HybridIdentityMetadata. - * - * @param nextLink the nextLink value to set. - * @return the HybridIdentityMetadataList object itself. - */ - public HybridIdentityMetadataList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: Array of HybridIdentityMetadata. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of HybridIdentityMetadata. - * - * @param value the value value to set. - * @return the HybridIdentityMetadataList object itself. - */ - public HybridIdentityMetadataList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model HybridIdentityMetadataList")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HybridIdentityMetadataList.class); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadatas.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadatas.java deleted file mode 100644 index f73fc930c52d..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/HybridIdentityMetadatas.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 HybridIdentityMetadatas. */ -public interface HybridIdentityMetadatas { - /** - * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param metadataName Name of the HybridIdentityMetadata. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String machineName, String metadataName, Context context); - - /** - * Gets HybridIdentityMetadata. - * - *

Implements HybridIdentityMetadata GET method. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param metadataName Name of the HybridIdentityMetadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return defines the HybridIdentityMetadata. - */ - HybridIdentityMetadata get(String resourceGroupName, String machineName, String metadataName); - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given 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 list of HybridIdentityMetadata as paginated response with {@link PagedIterable}. - */ - PagedIterable listByMachines(String resourceGroupName, String machineName); - - /** - * Implements GET HybridIdentityMetadata in a machine. - * - *

Returns the list of HybridIdentityMetadata of the given machine. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param machineName The name of the hybrid machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of HybridIdentityMetadata as paginated response with {@link PagedIterable}. - */ - PagedIterable listByMachines(String resourceGroupName, String machineName, Context context); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Identity.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Identity.java index d71f2320eb2c..505d14c2dd3f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Identity.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Identity.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Identity for the resource. */ +/** + * Identity for the resource. + */ @Fluent public final class Identity { /* @@ -28,13 +30,15 @@ public final class Identity { @JsonProperty(value = "type") private ResourceIdentityType type; - /** Creates an instance of Identity class. */ + /** + * Creates an instance of Identity class. + */ public Identity() { } /** * Get the principalId property: The principal ID of resource identity. - * + * * @return the principalId value. */ public String principalId() { @@ -43,7 +47,7 @@ public String principalId() { /** * Get the tenantId property: The tenant ID of resource. - * + * * @return the tenantId value. */ public String tenantId() { @@ -52,7 +56,7 @@ public String tenantId() { /** * Get the type property: The identity type. - * + * * @return the type value. */ public ResourceIdentityType type() { @@ -61,7 +65,7 @@ public ResourceIdentityType type() { /** * Set the type property: The identity type. - * + * * @param type the type value to set. * @return the Identity object itself. */ @@ -72,7 +76,7 @@ public Identity withType(ResourceIdentityType type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/InstanceViewTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/InstanceViewTypes.java deleted file mode 100644 index c284acd6248f..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/InstanceViewTypes.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for InstanceViewTypes. */ -public final class InstanceViewTypes extends ExpandableStringEnum { - /** Static value instanceView for InstanceViewTypes. */ - public static final InstanceViewTypes INSTANCE_VIEW = fromString("instanceView"); - - /** - * Creates a new instance of InstanceViewTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InstanceViewTypes() { - } - - /** - * Creates or finds a InstanceViewTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding InstanceViewTypes. - */ - @JsonCreator - public static InstanceViewTypes fromString(String name) { - return fromString(name, InstanceViewTypes.class); - } - - /** - * Gets known InstanceViewTypes values. - * - * @return known InstanceViewTypes values. - */ - public static Collection values() { - return values(InstanceViewTypes.class); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IpAddress.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IpAddress.java index 8adedcdbb937..c6d0098012dc 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IpAddress.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/IpAddress.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes properties of the IP address. */ +/** + * Describes properties of the IP address. + */ @Fluent public final class IpAddress { /* @@ -28,13 +30,15 @@ public final class IpAddress { @JsonProperty(value = "subnet", access = JsonProperty.Access.WRITE_ONLY) private Subnet subnet; - /** Creates an instance of IpAddress class. */ + /** + * Creates an instance of IpAddress class. + */ public IpAddress() { } /** * Get the address property: Represents the IP Address. - * + * * @return the address value. */ public String address() { @@ -43,7 +47,7 @@ public String address() { /** * Set the address property: Represents the IP Address. - * + * * @param address the address value to set. * @return the IpAddress object itself. */ @@ -54,7 +58,7 @@ public IpAddress withAddress(String address) { /** * Get the ipAddressVersion property: Represents the Ip Address Version. - * + * * @return the ipAddressVersion value. */ public String ipAddressVersion() { @@ -63,7 +67,7 @@ public String ipAddressVersion() { /** * Set the ipAddressVersion property: Represents the Ip Address Version. - * + * * @param ipAddressVersion the ipAddressVersion value to set. * @return the IpAddress object itself. */ @@ -74,7 +78,7 @@ public IpAddress withIpAddressVersion(String ipAddressVersion) { /** * Get the subnet property: The subnet to which this IP address belongs. - * + * * @return the subnet value. */ public Subnet subnet() { @@ -83,7 +87,7 @@ public Subnet subnet() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LastAttemptStatusEnum.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LastAttemptStatusEnum.java index d111040e7a7a..3f1a280920f1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LastAttemptStatusEnum.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LastAttemptStatusEnum.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Specifies the status of Agent Upgrade. */ +/** + * Specifies the status of Agent Upgrade. + */ public final class LastAttemptStatusEnum extends ExpandableStringEnum { - /** Static value Success for LastAttemptStatusEnum. */ + /** + * Static value Success for LastAttemptStatusEnum. + */ public static final LastAttemptStatusEnum SUCCESS = fromString("Success"); - /** Static value Failed for LastAttemptStatusEnum. */ + /** + * Static value Failed for LastAttemptStatusEnum. + */ public static final LastAttemptStatusEnum FAILED = fromString("Failed"); /** * Creates a new instance of LastAttemptStatusEnum value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public LastAttemptStatusEnum() { /** * Creates or finds a LastAttemptStatusEnum from its string representation. - * + * * @param name a name to look for. * @return the corresponding LastAttemptStatusEnum. */ @@ -38,7 +44,7 @@ public static LastAttemptStatusEnum fromString(String name) { /** * Gets known LastAttemptStatusEnum values. - * + * * @return known LastAttemptStatusEnum values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/License.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/License.java index c91593ffd1b6..44dd8443a424 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/License.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/License.java @@ -4,351 +4,158 @@ package com.azure.resourcemanager.hybridcompute.models; -import com.azure.core.management.Region; +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; +import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProperties; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** An immutable client-side representation of License. */ -public interface License { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. +/** + * Describes a license in a hybrid machine. + */ +@Fluent +public final class License extends Resource { + /* + * Hybrid Compute License properties */ - String id(); + @JsonProperty(value = "properties") + private LicenseProperties innerProperties; - /** - * 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. + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ - String type(); + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. + * Creates an instance of License class. */ - String location(); + public License() { + } /** - * Gets the tags property: Resource tags. - * - * @return the tags value. + * Get the innerProperties property: Hybrid Compute License properties. + * + * @return the innerProperties value. */ - Map tags(); + private LicenseProperties innerProperties() { + return this.innerProperties; + } /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * Get 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(); + public SystemData systemData() { + return this.systemData; + } /** - * Gets the tenantId property: Describes the tenant id. - * - * @return the tenantId value. + * {@inheritDoc} */ - String tenantId(); + @Override + public License withLocation(String location) { + super.withLocation(location); + return this; + } /** - * Gets the licenseType property: The type of the license resource. - * - * @return the licenseType value. + * {@inheritDoc} */ - LicenseType licenseType(); + @Override + public License withTags(Map tags) { + super.withTags(tags); + return this; + } /** - * Gets the licenseDetails property: Describes the properties of a License. - * - * @return the licenseDetails value. + * Get the provisioningState property: The provisioning state, which only appears in the response. + * + * @return the provisioningState value. */ - LicenseDetails licenseDetails(); + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } /** - * Gets the region of the resource. - * - * @return the region of the resource. + * Get the tenantId property: Describes the tenant id. + * + * @return the tenantId value. */ - Region region(); + public String tenantId() { + return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + } /** - * Gets the name of the resource region. - * - * @return the name of the resource region. + * Set the tenantId property: Describes the tenant id. + * + * @param tenantId the tenantId value to set. + * @return the License object itself. */ - String regionName(); + public License withTenantId(String tenantId) { + if (this.innerProperties() == null) { + this.innerProperties = new LicenseProperties(); + } + this.innerProperties().withTenantId(tenantId); + return this; + } /** - * Gets the name of the resource group. - * - * @return the name of the resource group. + * Get the licenseType property: The type of the license resource. + * + * @return the licenseType value. */ - String resourceGroupName(); + public LicenseType licenseType() { + return this.innerProperties() == null ? null : this.innerProperties().licenseType(); + } /** - * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner object. - * - * @return the inner object. + * Set the licenseType property: The type of the license resource. + * + * @param licenseType the licenseType value to set. + * @return the License object itself. */ - LicenseInner innerModel(); - - /** The entirety of the License definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { - } - - /** The License definition stages. */ - interface DefinitionStages { - /** The first stage of the License definition. */ - interface Blank extends WithLocation { - } - - /** The stage of the License 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 License 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 License 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.WithTenantId, - DefinitionStages.WithLicenseType, - DefinitionStages.WithLicenseDetails { - /** - * Executes the create request. - * - * @return the created resource. - */ - License create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - License create(Context context); - } - - /** The stage of the License 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 License definition allowing to specify tenantId. */ - interface WithTenantId { - /** - * Specifies the tenantId property: Describes the tenant id.. - * - * @param tenantId Describes the tenant id. - * @return the next definition stage. - */ - WithCreate withTenantId(String tenantId); - } - - /** The stage of the License definition allowing to specify licenseType. */ - interface WithLicenseType { - /** - * Specifies the licenseType property: The type of the license resource.. - * - * @param licenseType The type of the license resource. - * @return the next definition stage. - */ - WithCreate withLicenseType(LicenseType licenseType); - } - - /** The stage of the License definition allowing to specify licenseDetails. */ - interface WithLicenseDetails { - /** - * Specifies the licenseDetails property: Describes the properties of a License.. - * - * @param licenseDetails Describes the properties of a License. - * @return the next definition stage. - */ - WithCreate withLicenseDetails(LicenseDetails licenseDetails); + public License withLicenseType(LicenseType licenseType) { + if (this.innerProperties() == null) { + this.innerProperties = new LicenseProperties(); } + this.innerProperties().withLicenseType(licenseType); + return this; } /** - * Begins update for the License resource. - * - * @return the stage of resource update. + * Get the licenseDetails property: Describes the properties of a License. + * + * @return the licenseDetails value. */ - License.Update update(); - - /** The template for License update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithLicenseType, - UpdateStages.WithState, - UpdateStages.WithTarget, - UpdateStages.WithEdition, - UpdateStages.WithType, - UpdateStages.WithProcessors { - /** - * Executes the update request. - * - * @return the updated resource. - */ - License apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - License apply(Context context); - } - - /** The License update stages. */ - interface UpdateStages { - /** The stage of the License 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 License update allowing to specify licenseType. */ - interface WithLicenseType { - /** - * Specifies the licenseType property: The type of the license resource.. - * - * @param licenseType The type of the license resource. - * @return the next definition stage. - */ - Update withLicenseType(LicenseType licenseType); - } - - /** The stage of the License update allowing to specify state. */ - interface WithState { - /** - * Specifies the state property: Describes the state of the license.. - * - * @param state Describes the state of the license. - * @return the next definition stage. - */ - Update withState(LicenseState state); - } - - /** The stage of the License update allowing to specify target. */ - interface WithTarget { - /** - * Specifies the target property: Describes the license target server.. - * - * @param target Describes the license target server. - * @return the next definition stage. - */ - Update withTarget(LicenseTarget target); - } - - /** The stage of the License update allowing to specify edition. */ - interface WithEdition { - /** - * Specifies the edition property: Describes the edition of the license. The values are either Standard or - * Datacenter.. - * - * @param edition Describes the edition of the license. The values are either Standard or Datacenter. - * @return the next definition stage. - */ - Update withEdition(LicenseEdition edition); - } - - /** The stage of the License update allowing to specify type. */ - interface WithType { - /** - * Specifies the type property: Describes the license core type (pCore or vCore).. - * - * @param type Describes the license core type (pCore or vCore). - * @return the next definition stage. - */ - Update withType(LicenseCoreType type); - } - - /** The stage of the License update allowing to specify processors. */ - interface WithProcessors { - /** - * Specifies the processors property: Describes the number of processors.. - * - * @param processors Describes the number of processors. - * @return the next definition stage. - */ - Update withProcessors(Integer processors); - } + public LicenseDetails licenseDetails() { + return this.innerProperties() == null ? null : this.innerProperties().licenseDetails(); } /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. + * Set the licenseDetails property: Describes the properties of a License. + * + * @param licenseDetails the licenseDetails value to set. + * @return the License object itself. */ - License refresh(); + public License withLicenseDetails(LicenseDetails licenseDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new LicenseProperties(); + } + this.innerProperties().withLicenseDetails(licenseDetails); + return this; + } /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. */ - License refresh(Context context); + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseAssignmentState.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseAssignmentState.java index d34ab4d9f00f..cee97bcb2b43 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseAssignmentState.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseAssignmentState.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Describes the license assignment state (Assigned or NotAssigned). */ +/** + * Describes the license assignment state (Assigned or NotAssigned). + */ public final class LicenseAssignmentState extends ExpandableStringEnum { - /** Static value Assigned for LicenseAssignmentState. */ + /** + * Static value Assigned for LicenseAssignmentState. + */ public static final LicenseAssignmentState ASSIGNED = fromString("Assigned"); - /** Static value NotAssigned for LicenseAssignmentState. */ + /** + * Static value NotAssigned for LicenseAssignmentState. + */ public static final LicenseAssignmentState NOT_ASSIGNED = fromString("NotAssigned"); /** * Creates a new instance of LicenseAssignmentState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public LicenseAssignmentState() { /** * Creates or finds a LicenseAssignmentState from its string representation. - * + * * @param name a name to look for. * @return the corresponding LicenseAssignmentState. */ @@ -38,7 +44,7 @@ public static LicenseAssignmentState fromString(String name) { /** * Gets known LicenseAssignmentState values. - * + * * @return known LicenseAssignmentState values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseCoreType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseCoreType.java index d38e2a12f60b..a4cedcdca77c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseCoreType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseCoreType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Describes the license core type (pCore or vCore). */ +/** + * Describes the license core type (pCore or vCore). + */ public final class LicenseCoreType extends ExpandableStringEnum { - /** Static value pCore for LicenseCoreType. */ + /** + * Static value pCore for LicenseCoreType. + */ public static final LicenseCoreType P_CORE = fromString("pCore"); - /** Static value vCore for LicenseCoreType. */ + /** + * Static value vCore for LicenseCoreType. + */ public static final LicenseCoreType V_CORE = fromString("vCore"); /** * Creates a new instance of LicenseCoreType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public LicenseCoreType() { /** * Creates or finds a LicenseCoreType from its string representation. - * + * * @param name a name to look for. * @return the corresponding LicenseCoreType. */ @@ -38,7 +44,7 @@ public static LicenseCoreType fromString(String name) { /** * Gets known LicenseCoreType values. - * + * * @return known LicenseCoreType values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseDetails.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseDetails.java index cc0e57c4c2da..423c5885b50c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseDetails.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseDetails.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the properties of a License. */ +/** + * Describes the properties of a License. + */ @Fluent public final class LicenseDetails { /* @@ -52,13 +54,15 @@ public final class LicenseDetails { @JsonProperty(value = "immutableId", access = JsonProperty.Access.WRITE_ONLY) private String immutableId; - /** Creates an instance of LicenseDetails class. */ + /** + * Creates an instance of LicenseDetails class. + */ public LicenseDetails() { } /** * Get the state property: Describes the state of the license. - * + * * @return the state value. */ public LicenseState state() { @@ -67,7 +71,7 @@ public LicenseState state() { /** * Set the state property: Describes the state of the license. - * + * * @param state the state value to set. * @return the LicenseDetails object itself. */ @@ -78,7 +82,7 @@ public LicenseDetails withState(LicenseState state) { /** * Get the target property: Describes the license target server. - * + * * @return the target value. */ public LicenseTarget target() { @@ -87,7 +91,7 @@ public LicenseTarget target() { /** * Set the target property: Describes the license target server. - * + * * @param target the target value to set. * @return the LicenseDetails object itself. */ @@ -98,7 +102,7 @@ public LicenseDetails withTarget(LicenseTarget target) { /** * Get the edition property: Describes the edition of the license. The values are either Standard or Datacenter. - * + * * @return the edition value. */ public LicenseEdition edition() { @@ -107,7 +111,7 @@ public LicenseEdition edition() { /** * Set the edition property: Describes the edition of the license. The values are either Standard or Datacenter. - * + * * @param edition the edition value to set. * @return the LicenseDetails object itself. */ @@ -118,7 +122,7 @@ public LicenseDetails withEdition(LicenseEdition edition) { /** * Get the type property: Describes the license core type (pCore or vCore). - * + * * @return the type value. */ public LicenseCoreType type() { @@ -127,7 +131,7 @@ public LicenseCoreType type() { /** * Set the type property: Describes the license core type (pCore or vCore). - * + * * @param type the type value to set. * @return the LicenseDetails object itself. */ @@ -138,7 +142,7 @@ public LicenseDetails withType(LicenseCoreType type) { /** * Get the processors property: Describes the number of processors. - * + * * @return the processors value. */ public Integer processors() { @@ -147,7 +151,7 @@ public Integer processors() { /** * Set the processors property: Describes the number of processors. - * + * * @param processors the processors value to set. * @return the LicenseDetails object itself. */ @@ -158,7 +162,7 @@ public LicenseDetails withProcessors(Integer processors) { /** * Get the assignedLicenses property: Describes the number of assigned licenses. - * + * * @return the assignedLicenses value. */ public Integer assignedLicenses() { @@ -167,7 +171,7 @@ public Integer assignedLicenses() { /** * Get the immutableId property: Describes the immutable id. - * + * * @return the immutableId value. */ public String immutableId() { @@ -176,7 +180,7 @@ public String immutableId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseEdition.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseEdition.java index 8e0f5a01d915..f517c9c1795a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseEdition.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseEdition.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Describes the edition of the license. The values are either Standard or Datacenter. */ +/** + * Describes the edition of the license. The values are either Standard or Datacenter. + */ public final class LicenseEdition extends ExpandableStringEnum { - /** Static value Standard for LicenseEdition. */ + /** + * Static value Standard for LicenseEdition. + */ public static final LicenseEdition STANDARD = fromString("Standard"); - /** Static value Datacenter for LicenseEdition. */ + /** + * Static value Datacenter for LicenseEdition. + */ public static final LicenseEdition DATACENTER = fromString("Datacenter"); /** * Creates a new instance of LicenseEdition value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public LicenseEdition() { /** * Creates or finds a LicenseEdition from its string representation. - * + * * @param name a name to look for. * @return the corresponding LicenseEdition. */ @@ -38,7 +44,7 @@ public static LicenseEdition fromString(String name) { /** * Gets known LicenseEdition values. - * + * * @return known LicenseEdition values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfile.java deleted file mode 100644 index 7c61646d7033..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfile.java +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.LicenseProfileInner; -import java.util.List; -import java.util.Map; - -/** An immutable client-side representation of LicenseProfile. */ -public interface LicenseProfile { - /** - * 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 assignedLicense property: The resource id of the license. - * - * @return the assignedLicense value. - */ - String assignedLicense(); - - /** - * Gets the serverType property: The type of the Esu servers. - * - * @return the serverType value. - */ - EsuServerType serverType(); - - /** - * Gets the esuEligibility property: Indicates the eligibility state of Esu. - * - * @return the esuEligibility value. - */ - EsuEligibility esuEligibility(); - - /** - * Gets the esuKeyState property: Indicates whether there is an ESU Key currently active for the machine. - * - * @return the esuKeyState value. - */ - EsuKeyState esuKeyState(); - - /** - * Gets the assignedLicenseImmutableId property: The guid id of the license. - * - * @return the assignedLicenseImmutableId value. - */ - String assignedLicenseImmutableId(); - - /** - * Gets the esuKeys property: The list of ESU keys. - * - * @return the esuKeys value. - */ - List esuKeys(); - - /** - * 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.LicenseProfileInner object. - * - * @return the inner object. - */ - LicenseProfileInner innerModel(); - - /** The entirety of the LicenseProfile definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { - } - - /** The LicenseProfile definition stages. */ - interface DefinitionStages { - /** The first stage of the LicenseProfile definition. */ - interface Blank extends WithLocation { - } - - /** The stage of the LicenseProfile 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 LicenseProfile 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 LicenseProfile 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.WithAssignedLicense { - /** - * Executes the create request. - * - * @return the created resource. - */ - LicenseProfile create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - LicenseProfile create(Context context); - } - - /** The stage of the LicenseProfile 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 LicenseProfile definition allowing to specify assignedLicense. */ - interface WithAssignedLicense { - /** - * Specifies the assignedLicense property: The resource id of the license.. - * - * @param assignedLicense The resource id of the license. - * @return the next definition stage. - */ - WithCreate withAssignedLicense(String assignedLicense); - } - } - - /** - * Begins update for the LicenseProfile resource. - * - * @return the stage of resource update. - */ - LicenseProfile.Update update(); - - /** The template for LicenseProfile update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithAssignedLicense { - /** - * Executes the update request. - * - * @return the updated resource. - */ - LicenseProfile apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - LicenseProfile apply(Context context); - } - - /** The LicenseProfile update stages. */ - interface UpdateStages { - /** The stage of the LicenseProfile 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 LicenseProfile update allowing to specify assignedLicense. */ - interface WithAssignedLicense { - /** - * Specifies the assignedLicense property: The resource id of the license.. - * - * @param assignedLicense The resource id of the license. - * @return the next definition stage. - */ - Update withAssignedLicense(String assignedLicense); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - LicenseProfile refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - LicenseProfile refresh(Context context); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.java index a666af5e4721..d1e591c234b4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileArmEsuPropertiesWithoutAssignedLicense.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the properties of a License Profile ARM model. */ +/** + * Describes the properties of a License Profile ARM model. + */ @Immutable public class LicenseProfileArmEsuPropertiesWithoutAssignedLicense extends LicenseProfileStorageModelEsuProperties { /* @@ -28,13 +30,15 @@ public class LicenseProfileArmEsuPropertiesWithoutAssignedLicense extends Licens @JsonProperty(value = "esuKeyState", access = JsonProperty.Access.WRITE_ONLY) private EsuKeyState esuKeyState; - /** Creates an instance of LicenseProfileArmEsuPropertiesWithoutAssignedLicense class. */ + /** + * Creates an instance of LicenseProfileArmEsuPropertiesWithoutAssignedLicense class. + */ public LicenseProfileArmEsuPropertiesWithoutAssignedLicense() { } /** * Get the serverType property: The type of the Esu servers. - * + * * @return the serverType value. */ public EsuServerType serverType() { @@ -43,7 +47,7 @@ public EsuServerType serverType() { /** * Get the esuEligibility property: Indicates the eligibility state of Esu. - * + * * @return the esuEligibility value. */ public EsuEligibility esuEligibility() { @@ -52,7 +56,7 @@ public EsuEligibility esuEligibility() { /** * Get the esuKeyState property: Indicates whether there is an ESU Key currently active for the machine. - * + * * @return the esuKeyState value. */ public EsuKeyState esuKeyState() { @@ -61,7 +65,7 @@ public EsuKeyState esuKeyState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceView.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceView.java index 0b856e51381d..dd1961063dcb 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceView.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceView.java @@ -4,22 +4,246 @@ package com.azure.resourcemanager.hybridcompute.models; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewInner; +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileArmProductProfileProperties; +import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewSoftwareAssurance; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * License Profile Instance View in Machine Properties. + */ +@Fluent +public final class LicenseProfileMachineInstanceView { + /* + * Indicates the license status of the OS. + */ + @JsonProperty(value = "licenseStatus", access = JsonProperty.Access.WRITE_ONLY) + private LicenseStatus licenseStatus; + + /* + * Indicates the license channel. + */ + @JsonProperty(value = "licenseChannel", access = JsonProperty.Access.WRITE_ONLY) + private String licenseChannel; + + /* + * The softwareAssurance property. + */ + @JsonProperty(value = "softwareAssurance", access = JsonProperty.Access.WRITE_ONLY) + private LicenseProfileMachineInstanceViewSoftwareAssurance innerSoftwareAssurance; + + /* + * Properties for the Machine ESU profile. + */ + @JsonProperty(value = "esuProfile") + private LicenseProfileMachineInstanceViewEsuProperties esuProfile; + + /* + * Hybrid Compute Product Profile properties + */ + @JsonProperty(value = "productProfile", access = JsonProperty.Access.WRITE_ONLY) + private LicenseProfileArmProductProfileProperties innerProductProfile; + + /** + * Creates an instance of LicenseProfileMachineInstanceView class. + */ + public LicenseProfileMachineInstanceView() { + } + + /** + * Get the licenseStatus property: Indicates the license status of the OS. + * + * @return the licenseStatus value. + */ + public LicenseStatus licenseStatus() { + return this.licenseStatus; + } -/** An immutable client-side representation of LicenseProfileMachineInstanceView. */ -public interface LicenseProfileMachineInstanceView { /** - * Gets the esuProfile property: Properties for the Machine ESU profile. - * + * Get the licenseChannel property: Indicates the license channel. + * + * @return the licenseChannel value. + */ + public String licenseChannel() { + return this.licenseChannel; + } + + /** + * Get the innerSoftwareAssurance property: The softwareAssurance property. + * + * @return the innerSoftwareAssurance value. + */ + private LicenseProfileMachineInstanceViewSoftwareAssurance innerSoftwareAssurance() { + return this.innerSoftwareAssurance; + } + + /** + * Get the esuProfile property: Properties for the Machine ESU profile. + * * @return the esuProfile value. */ - LicenseProfileMachineInstanceViewEsuProperties esuProfile(); + public LicenseProfileMachineInstanceViewEsuProperties esuProfile() { + return this.esuProfile; + } + + /** + * Set the esuProfile property: Properties for the Machine ESU profile. + * + * @param esuProfile the esuProfile value to set. + * @return the LicenseProfileMachineInstanceView object itself. + */ + public LicenseProfileMachineInstanceView withEsuProfile(LicenseProfileMachineInstanceViewEsuProperties esuProfile) { + this.esuProfile = esuProfile; + return this; + } + + /** + * Get the innerProductProfile property: Hybrid Compute Product Profile properties. + * + * @return the innerProductProfile value. + */ + private LicenseProfileArmProductProfileProperties innerProductProfile() { + return this.innerProductProfile; + } + + /** + * Get the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @return the softwareAssuranceCustomer value. + */ + public Boolean softwareAssuranceCustomer() { + return this.innerSoftwareAssurance() == null ? null : this.innerSoftwareAssurance().softwareAssuranceCustomer(); + } + + /** + * Set the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @param softwareAssuranceCustomer the softwareAssuranceCustomer value to set. + * @return the LicenseProfileMachineInstanceView object itself. + */ + public LicenseProfileMachineInstanceView withSoftwareAssuranceCustomer(Boolean softwareAssuranceCustomer) { + if (this.innerSoftwareAssurance() == null) { + this.innerSoftwareAssurance = new LicenseProfileMachineInstanceViewSoftwareAssurance(); + } + this.innerSoftwareAssurance().withSoftwareAssuranceCustomer(softwareAssuranceCustomer); + return this; + } + + /** + * Get the subscriptionStatus property: Indicates the subscription status of the product. + * + * @return the subscriptionStatus value. + */ + public LicenseProfileSubscriptionStatus subscriptionStatus() { + return this.innerProductProfile() == null ? null : this.innerProductProfile().subscriptionStatus(); + } + + /** + * Set the subscriptionStatus property: Indicates the subscription status of the product. + * + * @param subscriptionStatus the subscriptionStatus value to set. + * @return the LicenseProfileMachineInstanceView object itself. + */ + public LicenseProfileMachineInstanceView + withSubscriptionStatus(LicenseProfileSubscriptionStatus subscriptionStatus) { + if (this.innerProductProfile() == null) { + this.innerProductProfile = new LicenseProfileArmProductProfileProperties(); + } + this.innerProductProfile().withSubscriptionStatus(subscriptionStatus); + return this; + } + + /** + * Get the productType property: Indicates the product type of the license. + * + * @return the productType value. + */ + public LicenseProfileProductType productType() { + return this.innerProductProfile() == null ? null : this.innerProductProfile().productType(); + } + + /** + * Set the productType property: Indicates the product type of the license. + * + * @param productType the productType value to set. + * @return the LicenseProfileMachineInstanceView object itself. + */ + public LicenseProfileMachineInstanceView withProductType(LicenseProfileProductType productType) { + if (this.innerProductProfile() == null) { + this.innerProductProfile = new LicenseProfileArmProductProfileProperties(); + } + this.innerProductProfile().withProductType(productType); + return this; + } + + /** + * Get the billingStartDate property: The timestamp in UTC when the billing starts. + * + * @return the billingStartDate value. + */ + public OffsetDateTime billingStartDate() { + return this.innerProductProfile() == null ? null : this.innerProductProfile().billingStartDate(); + } + + /** + * Get the enrollmentDate property: The timestamp in UTC when the user enrolls the feature. + * + * @return the enrollmentDate value. + */ + public OffsetDateTime enrollmentDate() { + return this.innerProductProfile() == null ? null : this.innerProductProfile().enrollmentDate(); + } + + /** + * Get the disenrollmentDate property: The timestamp in UTC when the user disenrolled the feature. + * + * @return the disenrollmentDate value. + */ + public OffsetDateTime disenrollmentDate() { + return this.innerProductProfile() == null ? null : this.innerProductProfile().disenrollmentDate(); + } + + /** + * Get the productFeatures property: The list of product features. + * + * @return the productFeatures value. + */ + public List productFeatures() { + return this.innerProductProfile() == null ? null : this.innerProductProfile().productFeatures(); + } + + /** + * Set the productFeatures property: The list of product features. + * + * @param productFeatures the productFeatures value to set. + * @return the LicenseProfileMachineInstanceView object itself. + */ + public LicenseProfileMachineInstanceView withProductFeatures(List productFeatures) { + if (this.innerProductProfile() == null) { + this.innerProductProfile = new LicenseProfileArmProductProfileProperties(); + } + this.innerProductProfile().withProductFeatures(productFeatures); + return this; + } /** - * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewInner - * object. - * - * @return the inner object. + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. */ - LicenseProfileMachineInstanceViewInner innerModel(); + public void validate() { + if (innerSoftwareAssurance() != null) { + innerSoftwareAssurance().validate(); + } + if (esuProfile() != null) { + esuProfile().validate(); + } + if (innerProductProfile() != null) { + innerProductProfile().validate(); + } + } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceViewEsuProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceViewEsuProperties.java index 9a76eb39b76c..8bb6e71817ba 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceViewEsuProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileMachineInstanceViewEsuProperties.java @@ -4,65 +4,84 @@ package com.azure.resourcemanager.hybridcompute.models; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewEsuPropertiesInner; -import java.util.List; +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; -/** An immutable client-side representation of LicenseProfileMachineInstanceViewEsuProperties. */ -public interface LicenseProfileMachineInstanceViewEsuProperties { - /** - * Gets the assignedLicenseImmutableId property: The guid id of the license. - * - * @return the assignedLicenseImmutableId value. +/** + * Properties for the Machine ESU profile. + */ +@Fluent +public final class LicenseProfileMachineInstanceViewEsuProperties + extends LicenseProfileArmEsuPropertiesWithoutAssignedLicense { + /* + * The assigned license resource. */ - String assignedLicenseImmutableId(); + @JsonProperty(value = "assignedLicense") + private License assignedLicense; - /** - * Gets the esuKeys property: The list of ESU keys. - * - * @return the esuKeys value. + /* + * Describes the license assignment state (Assigned or NotAssigned). */ - List esuKeys(); + @JsonProperty(value = "licenseAssignmentState") + private LicenseAssignmentState licenseAssignmentState; /** - * Gets the serverType property: The type of the Esu servers. - * - * @return the serverType value. + * Creates an instance of LicenseProfileMachineInstanceViewEsuProperties class. */ - EsuServerType serverType(); + public LicenseProfileMachineInstanceViewEsuProperties() { + } /** - * Gets the esuEligibility property: Indicates the eligibility state of Esu. - * - * @return the esuEligibility value. + * Get the assignedLicense property: The assigned license resource. + * + * @return the assignedLicense value. */ - EsuEligibility esuEligibility(); + public License assignedLicense() { + return this.assignedLicense; + } /** - * Gets the esuKeyState property: Indicates whether there is an ESU Key currently active for the machine. - * - * @return the esuKeyState value. + * Set the assignedLicense property: The assigned license resource. + * + * @param assignedLicense the assignedLicense value to set. + * @return the LicenseProfileMachineInstanceViewEsuProperties object itself. */ - EsuKeyState esuKeyState(); + public LicenseProfileMachineInstanceViewEsuProperties withAssignedLicense(License assignedLicense) { + this.assignedLicense = assignedLicense; + return this; + } /** - * Gets the assignedLicense property: The assigned license resource. - * - * @return the assignedLicense value. + * Get the licenseAssignmentState property: Describes the license assignment state (Assigned or NotAssigned). + * + * @return the licenseAssignmentState value. */ - License assignedLicense(); + public LicenseAssignmentState licenseAssignmentState() { + return this.licenseAssignmentState; + } /** - * Gets the licenseAssignmentState property: Describes the license assignment state (Assigned or NotAssigned). - * - * @return the licenseAssignmentState value. + * Set the licenseAssignmentState property: Describes the license assignment state (Assigned or NotAssigned). + * + * @param licenseAssignmentState the licenseAssignmentState value to set. + * @return the LicenseProfileMachineInstanceViewEsuProperties object itself. */ - LicenseAssignmentState licenseAssignmentState(); + public LicenseProfileMachineInstanceViewEsuProperties + withLicenseAssignmentState(LicenseAssignmentState licenseAssignmentState) { + this.licenseAssignmentState = licenseAssignmentState; + return this; + } /** - * Gets the inner - * com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewEsuPropertiesInner object. - * - * @return the inner object. + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. */ - LicenseProfileMachineInstanceViewEsuPropertiesInner innerModel(); + @Override + public void validate() { + super.validate(); + if (assignedLicense() != null) { + assignedLicense().validate(); + } + } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileProductType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileProductType.java new file mode 100644 index 000000000000..02e8984ff1c2 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileProductType.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The product type of the license. + */ +public final class LicenseProfileProductType extends ExpandableStringEnum { + /** + * Static value WindowsServer for LicenseProfileProductType. + */ + public static final LicenseProfileProductType WINDOWS_SERVER = fromString("WindowsServer"); + + /** + * Static value WindowsIoTEnterprise for LicenseProfileProductType. + */ + public static final LicenseProfileProductType WINDOWS_IO_TENTERPRISE = fromString("WindowsIoTEnterprise"); + + /** + * Creates a new instance of LicenseProfileProductType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseProfileProductType() { + } + + /** + * Creates or finds a LicenseProfileProductType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseProfileProductType. + */ + @JsonCreator + public static LicenseProfileProductType fromString(String name) { + return fromString(name, LicenseProfileProductType.class); + } + + /** + * Gets known LicenseProfileProductType values. + * + * @return known LicenseProfileProductType values. + */ + public static Collection values() { + return values(LicenseProfileProductType.class); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileStorageModelEsuProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileStorageModelEsuProperties.java index cd5358ee5df2..f72a80d16bc1 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileStorageModelEsuProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileStorageModelEsuProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** License profile storage model for ESU properties. */ +/** + * License profile storage model for ESU properties. + */ @Immutable public class LicenseProfileStorageModelEsuProperties { /* @@ -23,13 +25,15 @@ public class LicenseProfileStorageModelEsuProperties { @JsonProperty(value = "esuKeys", access = JsonProperty.Access.WRITE_ONLY) private List esuKeys; - /** Creates an instance of LicenseProfileStorageModelEsuProperties class. */ + /** + * Creates an instance of LicenseProfileStorageModelEsuProperties class. + */ public LicenseProfileStorageModelEsuProperties() { } /** * Get the assignedLicenseImmutableId property: The guid id of the license. - * + * * @return the assignedLicenseImmutableId value. */ public String assignedLicenseImmutableId() { @@ -38,7 +42,7 @@ public String assignedLicenseImmutableId() { /** * Get the esuKeys property: The list of ESU keys. - * + * * @return the esuKeys value. */ public List esuKeys() { @@ -47,7 +51,7 @@ public List esuKeys() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatus.java new file mode 100644 index 000000000000..ae5c515afc4b --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatus.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Subscription status of the OS or Product feature. + */ +public final class LicenseProfileSubscriptionStatus extends ExpandableStringEnum { + /** + * Static value Unknown for LicenseProfileSubscriptionStatus. + */ + public static final LicenseProfileSubscriptionStatus UNKNOWN = fromString("Unknown"); + + /** + * Static value Enabling for LicenseProfileSubscriptionStatus. + */ + public static final LicenseProfileSubscriptionStatus ENABLING = fromString("Enabling"); + + /** + * Static value Enabled for LicenseProfileSubscriptionStatus. + */ + public static final LicenseProfileSubscriptionStatus ENABLED = fromString("Enabled"); + + /** + * Static value Disabled for LicenseProfileSubscriptionStatus. + */ + public static final LicenseProfileSubscriptionStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of LicenseProfileSubscriptionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseProfileSubscriptionStatus() { + } + + /** + * Creates or finds a LicenseProfileSubscriptionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseProfileSubscriptionStatus. + */ + @JsonCreator + public static LicenseProfileSubscriptionStatus fromString(String name) { + return fromString(name, LicenseProfileSubscriptionStatus.class); + } + + /** + * Gets known LicenseProfileSubscriptionStatus values. + * + * @return known LicenseProfileSubscriptionStatus values. + */ + public static Collection values() { + return values(LicenseProfileSubscriptionStatus.class); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatusUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatusUpdate.java new file mode 100644 index 000000000000..2e0ba4ac5d7c --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileSubscriptionStatusUpdate.java @@ -0,0 +1,54 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Indicates the new subscription status of the OS or Product Features. + */ +public final class LicenseProfileSubscriptionStatusUpdate + extends ExpandableStringEnum { + /** + * Static value Enable for LicenseProfileSubscriptionStatusUpdate. + */ + public static final LicenseProfileSubscriptionStatusUpdate ENABLE = fromString("Enable"); + + /** + * Static value Disable for LicenseProfileSubscriptionStatusUpdate. + */ + public static final LicenseProfileSubscriptionStatusUpdate DISABLE = fromString("Disable"); + + /** + * Creates a new instance of LicenseProfileSubscriptionStatusUpdate value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseProfileSubscriptionStatusUpdate() { + } + + /** + * Creates or finds a LicenseProfileSubscriptionStatusUpdate from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseProfileSubscriptionStatusUpdate. + */ + @JsonCreator + public static LicenseProfileSubscriptionStatusUpdate fromString(String name) { + return fromString(name, LicenseProfileSubscriptionStatusUpdate.class); + } + + /** + * Gets known LicenseProfileSubscriptionStatusUpdate values. + * + * @return known LicenseProfileSubscriptionStatusUpdate values. + */ + public static Collection values() { + return values(LicenseProfileSubscriptionStatusUpdate.class); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileUpdate.java index 1c5ce17a6a25..43a45aa3141b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfileUpdate.java @@ -7,9 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileUpdateProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; -/** Describes a License Profile Update. */ +/** + * Describes a License Profile Update. + */ @Fluent public final class LicenseProfileUpdate extends ResourceUpdate { /* @@ -18,29 +21,58 @@ public final class LicenseProfileUpdate extends ResourceUpdate { @JsonProperty(value = "properties") private LicenseProfileUpdateProperties innerProperties; - /** Creates an instance of LicenseProfileUpdate class. */ + /** + * Creates an instance of LicenseProfileUpdate class. + */ public LicenseProfileUpdate() { } /** * Get the innerProperties property: Describe the Update properties of a license profile. - * + * * @return the innerProperties value. */ private LicenseProfileUpdateProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public LicenseProfileUpdate withTags(Map tags) { super.withTags(tags); return this; } + /** + * Get the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @return the softwareAssuranceCustomer value. + */ + public Boolean softwareAssuranceCustomer() { + return this.innerProperties() == null ? null : this.innerProperties().softwareAssuranceCustomer(); + } + + /** + * Set the softwareAssuranceCustomer property: Specifies if this machine is licensed as part of a Software Assurance + * agreement. + * + * @param softwareAssuranceCustomer the softwareAssuranceCustomer value to set. + * @return the LicenseProfileUpdate object itself. + */ + public LicenseProfileUpdate withSoftwareAssuranceCustomer(Boolean softwareAssuranceCustomer) { + if (this.innerProperties() == null) { + this.innerProperties = new LicenseProfileUpdateProperties(); + } + this.innerProperties().withSoftwareAssuranceCustomer(softwareAssuranceCustomer); + return this; + } + /** * Get the assignedLicense property: The resource id of the license. - * + * * @return the assignedLicense value. */ public String assignedLicense() { @@ -49,7 +81,7 @@ public String assignedLicense() { /** * Set the assignedLicense property: The resource id of the license. - * + * * @param assignedLicense the assignedLicense value to set. * @return the LicenseProfileUpdate object itself. */ @@ -61,9 +93,78 @@ public LicenseProfileUpdate withAssignedLicense(String assignedLicense) { return this; } + /** + * Get the subscriptionStatus property: Indicates the subscription status of the product. + * + * @return the subscriptionStatus value. + */ + public LicenseProfileSubscriptionStatusUpdate subscriptionStatus() { + return this.innerProperties() == null ? null : this.innerProperties().subscriptionStatus(); + } + + /** + * Set the subscriptionStatus property: Indicates the subscription status of the product. + * + * @param subscriptionStatus the subscriptionStatus value to set. + * @return the LicenseProfileUpdate object itself. + */ + public LicenseProfileUpdate withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate subscriptionStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new LicenseProfileUpdateProperties(); + } + this.innerProperties().withSubscriptionStatus(subscriptionStatus); + return this; + } + + /** + * Get the productType property: Indicates the product type of the license. + * + * @return the productType value. + */ + public LicenseProfileProductType productType() { + return this.innerProperties() == null ? null : this.innerProperties().productType(); + } + + /** + * Set the productType property: Indicates the product type of the license. + * + * @param productType the productType value to set. + * @return the LicenseProfileUpdate object itself. + */ + public LicenseProfileUpdate withProductType(LicenseProfileProductType productType) { + if (this.innerProperties() == null) { + this.innerProperties = new LicenseProfileUpdateProperties(); + } + this.innerProperties().withProductType(productType); + return this; + } + + /** + * Get the productFeatures property: The list of product feature updates. + * + * @return the productFeatures value. + */ + public List productFeatures() { + return this.innerProperties() == null ? null : this.innerProperties().productFeatures(); + } + + /** + * Set the productFeatures property: The list of product feature updates. + * + * @param productFeatures the productFeatures value to set. + * @return the LicenseProfileUpdate object itself. + */ + public LicenseProfileUpdate withProductFeatures(List productFeatures) { + if (this.innerProperties() == null) { + this.innerProperties = new LicenseProfileUpdateProperties(); + } + this.innerProperties().withProductFeatures(productFeatures); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfilesListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfilesListResult.java deleted file mode 100644 index 57da067ae944..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfilesListResult.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List hybrid machine license profile operation response. */ -@Fluent -public final class LicenseProfilesListResult { - /* - * The list of license profiles. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of license - * profile. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** Creates an instance of LicenseProfilesListResult class. */ - public LicenseProfilesListResult() { - } - - /** - * Get the value property: The list of license profiles. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of license profiles. - * - * @param value the value value to set. - * @return the LicenseProfilesListResult object itself. - */ - public LicenseProfilesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the - * next page of license profile. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the - * next page of license profile. - * - * @param nextLink the nextLink value to set. - * @return the LicenseProfilesListResult object itself. - */ - public LicenseProfilesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model LicenseProfilesListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LicenseProfilesListResult.class); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseState.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseState.java index 40b333cbc81a..6c4fb4e638c2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseState.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseState.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Describes the state of the license. */ +/** + * Describes the state of the license. + */ public final class LicenseState extends ExpandableStringEnum { - /** Static value Activated for LicenseState. */ + /** + * Static value Activated for LicenseState. + */ public static final LicenseState ACTIVATED = fromString("Activated"); - /** Static value Deactivated for LicenseState. */ + /** + * Static value Deactivated for LicenseState. + */ public static final LicenseState DEACTIVATED = fromString("Deactivated"); /** * Creates a new instance of LicenseState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public LicenseState() { /** * Creates or finds a LicenseState from its string representation. - * + * * @param name a name to look for. * @return the corresponding LicenseState. */ @@ -38,7 +44,7 @@ public static LicenseState fromString(String name) { /** * Gets known LicenseState values. - * + * * @return known LicenseState values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseStatus.java new file mode 100644 index 000000000000..10176ac919e1 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseStatus.java @@ -0,0 +1,78 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The license status. + */ +public final class LicenseStatus extends ExpandableStringEnum { + /** + * Static value Unlicensed for LicenseStatus. + */ + public static final LicenseStatus UNLICENSED = fromString("Unlicensed"); + + /** + * Static value Licensed for LicenseStatus. + */ + public static final LicenseStatus LICENSED = fromString("Licensed"); + + /** + * Static value OOBGrace for LicenseStatus. + */ + public static final LicenseStatus OOBGRACE = fromString("OOBGrace"); + + /** + * Static value OOTGrace for LicenseStatus. + */ + public static final LicenseStatus OOTGRACE = fromString("OOTGrace"); + + /** + * Static value NonGenuineGrace for LicenseStatus. + */ + public static final LicenseStatus NON_GENUINE_GRACE = fromString("NonGenuineGrace"); + + /** + * Static value Notification for LicenseStatus. + */ + public static final LicenseStatus NOTIFICATION = fromString("Notification"); + + /** + * Static value ExtendedGrace for LicenseStatus. + */ + public static final LicenseStatus EXTENDED_GRACE = fromString("ExtendedGrace"); + + /** + * Creates a new instance of LicenseStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseStatus() { + } + + /** + * Creates or finds a LicenseStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding LicenseStatus. + */ + @JsonCreator + public static LicenseStatus fromString(String name) { + return fromString(name, LicenseStatus.class); + } + + /** + * Gets known LicenseStatus values. + * + * @return known LicenseStatus values. + */ + public static Collection values() { + return values(LicenseStatus.class); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseTarget.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseTarget.java index 3fec11e45558..ab77410356b2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseTarget.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseTarget.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Describes the license target server. */ +/** + * Describes the license target server. + */ public final class LicenseTarget extends ExpandableStringEnum { - /** Static value Windows Server 2012 for LicenseTarget. */ + /** + * Static value Windows Server 2012 for LicenseTarget. + */ public static final LicenseTarget WINDOWS_SERVER_2012 = fromString("Windows Server 2012"); - /** Static value Windows Server 2012 R2 for LicenseTarget. */ + /** + * Static value Windows Server 2012 R2 for LicenseTarget. + */ public static final LicenseTarget WINDOWS_SERVER_2012_R2 = fromString("Windows Server 2012 R2"); /** * Creates a new instance of LicenseTarget value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public LicenseTarget() { /** * Creates or finds a LicenseTarget from its string representation. - * + * * @param name a name to look for. * @return the corresponding LicenseTarget. */ @@ -38,7 +44,7 @@ public static LicenseTarget fromString(String name) { /** * Gets known LicenseTarget values. - * + * * @return known LicenseTarget values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseType.java index 200c5173db76..3b41e40afc7b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of the license resource. */ +/** + * The type of the license resource. + */ public final class LicenseType extends ExpandableStringEnum { - /** Static value ESU for LicenseType. */ + /** + * Static value ESU for LicenseType. + */ public static final LicenseType ESU = fromString("ESU"); /** * Creates a new instance of LicenseType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public LicenseType() { /** * Creates or finds a LicenseType from its string representation. - * + * * @param name a name to look for. * @return the corresponding LicenseType. */ @@ -35,7 +39,7 @@ public static LicenseType fromString(String name) { /** * Gets known LicenseType values. - * + * * @return known LicenseType values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseUpdate.java index 7938ccc151bd..7a0c9ad4d169 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseUpdate.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Describes a License Update. */ +/** + * Describes a License Update. + */ @Fluent public final class LicenseUpdate extends ResourceUpdate { /* @@ -18,20 +20,24 @@ public final class LicenseUpdate extends ResourceUpdate { @JsonProperty(value = "properties") private LicenseUpdateProperties innerProperties; - /** Creates an instance of LicenseUpdate class. */ + /** + * Creates an instance of LicenseUpdate class. + */ public LicenseUpdate() { } /** * Get the innerProperties property: License Update properties. - * + * * @return the innerProperties value. */ private LicenseUpdateProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public LicenseUpdate withTags(Map tags) { super.withTags(tags); @@ -40,7 +46,7 @@ public LicenseUpdate withTags(Map tags) { /** * Get the licenseType property: The type of the license resource. - * + * * @return the licenseType value. */ public LicenseType licenseType() { @@ -49,7 +55,7 @@ public LicenseType licenseType() { /** * Set the licenseType property: The type of the license resource. - * + * * @param licenseType the licenseType value to set. * @return the LicenseUpdate object itself. */ @@ -63,7 +69,7 @@ public LicenseUpdate withLicenseType(LicenseType licenseType) { /** * Get the state property: Describes the state of the license. - * + * * @return the state value. */ public LicenseState state() { @@ -72,7 +78,7 @@ public LicenseState state() { /** * Set the state property: Describes the state of the license. - * + * * @param state the state value to set. * @return the LicenseUpdate object itself. */ @@ -86,7 +92,7 @@ public LicenseUpdate withState(LicenseState state) { /** * Get the target property: Describes the license target server. - * + * * @return the target value. */ public LicenseTarget target() { @@ -95,7 +101,7 @@ public LicenseTarget target() { /** * Set the target property: Describes the license target server. - * + * * @param target the target value to set. * @return the LicenseUpdate object itself. */ @@ -109,7 +115,7 @@ public LicenseUpdate withTarget(LicenseTarget target) { /** * Get the edition property: Describes the edition of the license. The values are either Standard or Datacenter. - * + * * @return the edition value. */ public LicenseEdition edition() { @@ -118,7 +124,7 @@ public LicenseEdition edition() { /** * Set the edition property: Describes the edition of the license. The values are either Standard or Datacenter. - * + * * @param edition the edition value to set. * @return the LicenseUpdate object itself. */ @@ -132,7 +138,7 @@ public LicenseUpdate withEdition(LicenseEdition edition) { /** * Get the type property: Describes the license core type (pCore or vCore). - * + * * @return the type value. */ public LicenseCoreType type() { @@ -141,7 +147,7 @@ public LicenseCoreType type() { /** * Set the type property: Describes the license core type (pCore or vCore). - * + * * @param type the type value to set. * @return the LicenseUpdate object itself. */ @@ -155,7 +161,7 @@ public LicenseUpdate withType(LicenseCoreType type) { /** * Get the processors property: Describes the number of processors. - * + * * @return the processors value. */ public Integer processors() { @@ -164,7 +170,7 @@ public Integer processors() { /** * Set the processors property: Describes the number of processors. - * + * * @param processors the processors value to set. * @return the LicenseUpdate object itself. */ @@ -178,7 +184,7 @@ public LicenseUpdate withProcessors(Integer processors) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Licenses.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Licenses.java deleted file mode 100644 index 86e28ecacf56..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Licenses.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; - -/** Resource collection API of Licenses. */ -public interface Licenses { - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - License validateLicense(LicenseInner parameters); - - /** - * The operation to validate a license. - * - * @param parameters Parameters supplied to the license validation operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - License validateLicense(LicenseInner parameters, Context context); - - /** - * Retrieves information about the view of a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String licenseName, Context context); - - /** - * Retrieves information about the view of a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license in a hybrid machine. - */ - License getByResourceGroup(String resourceGroupName, String licenseName); - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String licenseName); - - /** - * The operation to delete a license. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param licenseName The name of the license. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String licenseName, Context context); - - /** - * The operation to get all licenses 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 licenses 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 licenses 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 licenses 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 license. - * - * @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 license in a hybrid machine along with {@link Response}. - */ - License getById(String id); - - /** - * Retrieves information about the view of a license. - * - * @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 license in a hybrid machine along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * The operation to delete a license. - * - * @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 license. - * - * @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 License resource. - * - * @param name resource name. - * @return the first stage of the new License definition. - */ - License.DefinitionStages.Blank define(String name); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicensesListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicensesListResult.java deleted file mode 100644 index 7f122d043c4e..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicensesListResult.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List license operation response. */ -@Fluent -public final class LicensesListResult { - /* - * The list of licenses. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of license - * profile. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** Creates an instance of LicensesListResult class. */ - public LicensesListResult() { - } - - /** - * Get the value property: The list of licenses. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of licenses. - * - * @param value the value value to set. - * @return the LicensesListResult object itself. - */ - public LicensesListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the - * next page of license profile. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the - * next page of license profile. - * - * @param nextLink the nextLink value to set. - * @return the LicensesListResult object itself. - */ - public LicensesListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model LicensesListResult")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LicensesListResult.class); -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LinuxParameters.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LinuxParameters.java index 5cf429e78b18..11e89d613222 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LinuxParameters.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LinuxParameters.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Input for InstallPatches on a Linux VM, as directly received by the API. */ +/** + * Input for InstallPatches on a Linux VM, as directly received by the API. + */ @Fluent public final class LinuxParameters { /* @@ -29,14 +31,16 @@ public final class LinuxParameters { @JsonProperty(value = "packageNameMasksToExclude") private List packageNameMasksToExclude; - /** Creates an instance of LinuxParameters class. */ + /** + * Creates an instance of LinuxParameters class. + */ public LinuxParameters() { } /** * Get the classificationsToInclude property: The update classifications to select when installing patches for * Linux. - * + * * @return the classificationsToInclude value. */ public List classificationsToInclude() { @@ -46,12 +50,12 @@ public List classificationsToInclude() { /** * Set the classificationsToInclude property: The update classifications to select when installing patches for * Linux. - * + * * @param classificationsToInclude the classificationsToInclude value to set. * @return the LinuxParameters object itself. */ - public LinuxParameters withClassificationsToInclude( - List classificationsToInclude) { + public LinuxParameters + withClassificationsToInclude(List classificationsToInclude) { this.classificationsToInclude = classificationsToInclude; return this; } @@ -59,7 +63,7 @@ public LinuxParameters withClassificationsToInclude( /** * Get the packageNameMasksToInclude property: packages to include in the patch operation. Format: * packageName_packageVersion. - * + * * @return the packageNameMasksToInclude value. */ public List packageNameMasksToInclude() { @@ -69,7 +73,7 @@ public List packageNameMasksToInclude() { /** * Set the packageNameMasksToInclude property: packages to include in the patch operation. Format: * packageName_packageVersion. - * + * * @param packageNameMasksToInclude the packageNameMasksToInclude value to set. * @return the LinuxParameters object itself. */ @@ -81,7 +85,7 @@ public LinuxParameters withPackageNameMasksToInclude(List packageNameMas /** * Get the packageNameMasksToExclude property: packages to exclude in the patch operation. Format: * packageName_packageVersion. - * + * * @return the packageNameMasksToExclude value. */ public List packageNameMasksToExclude() { @@ -91,7 +95,7 @@ public List packageNameMasksToExclude() { /** * Set the packageNameMasksToExclude property: packages to exclude in the patch operation. Format: * packageName_packageVersion. - * + * * @param packageNameMasksToExclude the packageNameMasksToExclude value to set. * @return the LinuxParameters object itself. */ @@ -102,7 +106,7 @@ public LinuxParameters withPackageNameMasksToExclude(List packageNameMas /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LocationData.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LocationData.java index f381b2483f5f..8c16b47fb0f2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LocationData.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LocationData.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Metadata pertaining to the geographic location of the resource. */ +/** + * Metadata pertaining to the geographic location of the resource. + */ @Fluent public final class LocationData { /* @@ -35,13 +37,15 @@ public final class LocationData { @JsonProperty(value = "countryOrRegion") private String countryOrRegion; - /** Creates an instance of LocationData class. */ + /** + * Creates an instance of LocationData class. + */ public LocationData() { } /** * Get the name property: A canonical name for the geographic or physical location. - * + * * @return the name value. */ public String name() { @@ -50,7 +54,7 @@ public String name() { /** * Set the name property: A canonical name for the geographic or physical location. - * + * * @param name the name value to set. * @return the LocationData object itself. */ @@ -61,7 +65,7 @@ public LocationData withName(String name) { /** * Get the city property: The city or locality where the resource is located. - * + * * @return the city value. */ public String city() { @@ -70,7 +74,7 @@ public String city() { /** * Set the city property: The city or locality where the resource is located. - * + * * @param city the city value to set. * @return the LocationData object itself. */ @@ -81,7 +85,7 @@ public LocationData withCity(String city) { /** * Get the district property: The district, state, or province where the resource is located. - * + * * @return the district value. */ public String district() { @@ -90,7 +94,7 @@ public String district() { /** * Set the district property: The district, state, or province where the resource is located. - * + * * @param district the district value to set. * @return the LocationData object itself. */ @@ -101,7 +105,7 @@ public LocationData withDistrict(String district) { /** * Get the countryOrRegion property: The country or region where the resource is located. - * + * * @return the countryOrRegion value. */ public String countryOrRegion() { @@ -110,7 +114,7 @@ public String countryOrRegion() { /** * Set the countryOrRegion property: The country or region where the resource is located. - * + * * @param countryOrRegion the countryOrRegion value to set. * @return the LocationData object itself. */ @@ -121,14 +125,13 @@ public LocationData withCountryOrRegion(String countryOrRegion) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model LocationData")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model LocationData")); } } 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 dfc1f367ee19..4288ad7d1201 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 @@ -10,54 +10,57 @@ import java.time.OffsetDateTime; import java.util.List; import java.util.Map; +import java.util.UUID; -/** An immutable client-side representation of Machine. */ +/** + * An immutable client-side representation of Machine. + */ public interface Machine { /** * 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 resources property: The list of extensions affiliated to the machine. - * + * * @return the resources value. */ List resources(); /** * Gets the identity property: Identity for the resource. - * + * * @return the identity value. */ Identity identity(); @@ -65,21 +68,21 @@ public interface Machine { /** * Gets the kind property: Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware * etc. - * + * * @return the kind value. */ ArcKindEnum kind(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @return the locationData value. */ LocationData locationData(); @@ -87,98 +90,98 @@ public interface Machine { /** * Gets the agentConfiguration property: Configurable properties that the user can set locally via the azcmagent * config command, or remotely via ARM. - * + * * @return the agentConfiguration value. */ AgentConfiguration agentConfiguration(); /** * Gets the serviceStatuses property: Statuses of dependent services that are reported back to ARM. - * + * * @return the serviceStatuses value. */ ServiceStatuses serviceStatuses(); /** * Gets the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @return the cloudMetadata value. */ CloudMetadata cloudMetadata(); /** * Gets the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @return the agentUpgrade value. */ AgentUpgrade agentUpgrade(); /** * Gets the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @return the osProfile value. */ OSProfile osProfile(); /** - * Gets the licenseProfile property: Specifies the ESU related properties for a machine. - * + * Gets the licenseProfile property: Specifies the License related properties for a machine. + * * @return the licenseProfile value. */ LicenseProfileMachineInstanceView licenseProfile(); /** * Gets the provisioningState property: The provisioning state, which only appears in the response. - * + * * @return the provisioningState value. */ String provisioningState(); /** * Gets the status property: The status of the hybrid machine agent. - * + * * @return the status value. */ StatusTypes status(); /** * Gets the lastStatusChange property: The time of the last status change. - * + * * @return the lastStatusChange value. */ OffsetDateTime lastStatusChange(); /** * Gets the errorDetails property: Details about the error state. - * + * * @return the errorDetails value. */ List errorDetails(); /** * Gets the agentVersion property: The hybrid machine agent full version. - * + * * @return the agentVersion value. */ String agentVersion(); /** * Gets the vmId property: Specifies the hybrid machine unique ID. - * + * * @return the vmId value. */ - String vmId(); + UUID vmId(); /** * Gets the displayName property: Specifies the hybrid machine display name. - * + * * @return the displayName value. */ String displayName(); /** * Gets the machineFqdn property: Specifies the hybrid machine FQDN. - * + * * @return the machineFqdn value. */ String machineFqdn(); @@ -186,70 +189,77 @@ public interface Machine { /** * Gets the clientPublicKey property: Public Key that the client provides to be used during initial resource * onboarding. - * + * * @return the clientPublicKey value. */ String clientPublicKey(); /** * Gets the osName property: The Operating System running on the hybrid machine. - * + * * @return the osName value. */ String osName(); /** * Gets the osVersion property: The version of Operating System running on the hybrid machine. - * + * * @return the osVersion value. */ String osVersion(); /** * Gets the osType property: The type of Operating System (windows/linux). - * + * * @return the osType value. */ String osType(); /** * Gets the vmUuid property: Specifies the Arc Machine's unique SMBIOS ID. - * + * * @return the vmUuid value. */ - String vmUuid(); + UUID vmUuid(); /** * Gets the extensions property: Machine Extensions information (deprecated field). - * + * * @return the extensions value. */ List extensions(); /** * Gets the osSku property: Specifies the Operating System product SKU. - * + * * @return the osSku value. */ String osSku(); + /** + * Gets the osEdition property: The edition of the Operating System. + * + * @return the osEdition value. + */ + String osEdition(); + /** * Gets the domainName property: Specifies the Windows domain name. - * + * * @return the domainName value. */ String domainName(); /** * Gets the adFqdn property: Specifies the AD fully qualified display name. - * + * * @return the adFqdn value. */ String adFqdn(); /** * Gets the dnsFqdn property: Specifies the DNS fully qualified display name. - * + * * @return the dnsFqdn value. */ String dnsFqdn(); @@ -257,7 +267,7 @@ public interface Machine { /** * Gets the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @return the privateLinkScopeResourceId value. */ String privateLinkScopeResourceId(); @@ -265,35 +275,35 @@ public interface Machine { /** * Gets the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @return the parentClusterResourceId value. */ String parentClusterResourceId(); /** * Gets the mssqlDiscovered property: Specifies whether any MS SQL instance is discovered on the machine. - * + * * @return the mssqlDiscovered value. */ String mssqlDiscovered(); /** * Gets the detectedProperties property: Detected properties from the machine. - * + * * @return the detectedProperties value. */ Map detectedProperties(); /** * Gets the networkProfile property: Information about the network the machine is on. - * + * * @return the networkProfile value. */ NetworkProfile networkProfile(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner object. - * + * * @return the inner object. */ MachineInner innerModel(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineAssessPatchesResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineAssessPatchesResult.java index da2398a48f5e..15381d502e7f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineAssessPatchesResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineAssessPatchesResult.java @@ -7,29 +7,32 @@ import com.azure.core.management.exception.ManagementError; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineAssessPatchesResultInner; import java.time.OffsetDateTime; +import java.util.UUID; -/** An immutable client-side representation of MachineAssessPatchesResult. */ +/** + * An immutable client-side representation of MachineAssessPatchesResult. + */ public interface MachineAssessPatchesResult { /** * Gets the status property: The overall success or failure status of the operation. It remains "InProgress" until * the operation completes. At that point it will become "Unknown", "Failed", "Succeeded", or * "CompletedWithWarnings.". - * + * * @return the status value. */ PatchOperationStatus status(); /** * Gets the assessmentActivityId property: The activity ID of the operation that produced this result. - * + * * @return the assessmentActivityId value. */ - String assessmentActivityId(); + UUID assessmentActivityId(); /** * Gets the rebootPending property: The overall reboot status of the VM. It will be true when partially installed * patches require a reboot to complete installation but the reboot has not yet occurred. - * + * * @return the rebootPending value. */ Boolean rebootPending(); @@ -37,42 +40,42 @@ public interface MachineAssessPatchesResult { /** * Gets the availablePatchCountByClassification property: Summarization of patches available for installation on the * machine by classification. - * + * * @return the availablePatchCountByClassification value. */ AvailablePatchCountByClassification availablePatchCountByClassification(); /** * Gets the startDateTime property: The UTC timestamp when the operation began. - * + * * @return the startDateTime value. */ OffsetDateTime startDateTime(); /** * Gets the lastModifiedDateTime property: The UTC timestamp when the operation finished. - * + * * @return the lastModifiedDateTime value. */ OffsetDateTime lastModifiedDateTime(); /** * Gets the startedBy property: Indicates if operation was triggered by user or by platform. - * + * * @return the startedBy value. */ PatchOperationStartedBy startedBy(); /** * Gets the patchServiceUsed property: Specifies the patch service used for the operation. - * + * * @return the patchServiceUsed value. */ PatchServiceUsed patchServiceUsed(); /** * Gets the osType property: The operating system type of the machine. - * + * * @return the osType value. */ OsType osType(); @@ -80,14 +83,14 @@ public interface MachineAssessPatchesResult { /** * Gets the errorDetails property: The errors that were encountered during execution of the operation. The details * array contains the list of them. - * + * * @return the errorDetails value. */ ManagementError errorDetails(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.MachineAssessPatchesResultInner object. - * + * * @return the inner object. */ MachineAssessPatchesResultInner innerModel(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtension.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtension.java index 3394180622db..033c5380ec79 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtension.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtension.java @@ -10,104 +10,111 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner; import java.util.Map; -/** An immutable client-side representation of MachineExtension. */ +/** + * An immutable client-side representation of MachineExtension. + */ public interface MachineExtension { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the properties property: Describes Machine Extension Properties. - * + * * @return the properties value. */ MachineExtensionProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner object. - * + * * @return the inner object. */ MachineExtensionInner innerModel(); - /** The entirety of the MachineExtension definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { + /** + * The entirety of the MachineExtension definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The MachineExtension definition stages. */ + /** + * The MachineExtension definition stages. + */ interface DefinitionStages { - /** The first stage of the MachineExtension definition. */ + /** + * The first stage of the MachineExtension definition. + */ interface Blank extends WithLocation { } - /** The stage of the MachineExtension definition allowing to specify location. */ + /** + * The stage of the MachineExtension 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. */ @@ -115,18 +122,20 @@ interface WithLocation { /** * 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 MachineExtension definition allowing to specify parent resource. */ + /** + * The stage of the MachineExtension 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 machine where the extension should be created or updated. * @return the next definition stage. @@ -141,36 +150,40 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ MachineExtension create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ MachineExtension create(Context context); } - /** The stage of the MachineExtension definition allowing to specify tags. */ + /** + * The stage of the MachineExtension 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 MachineExtension definition allowing to specify properties. */ + /** + * The stage of the MachineExtension definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Describes Machine Extension Properties.. - * + * * @param properties Describes Machine Extension Properties. * @return the next definition stage. */ @@ -180,144 +193,159 @@ interface WithProperties { /** * Begins update for the MachineExtension resource. - * + * * @return the stage of resource update. */ MachineExtension.Update update(); - /** The template for MachineExtension update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithForceUpdateTag, - UpdateStages.WithPublisher, - UpdateStages.WithType, - UpdateStages.WithTypeHandlerVersion, - UpdateStages.WithEnableAutomaticUpgrade, - UpdateStages.WithAutoUpgradeMinorVersion, - UpdateStages.WithSettings, - UpdateStages.WithProtectedSettings { + /** + * The template for MachineExtension update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithForceUpdateTag, UpdateStages.WithPublisher, + UpdateStages.WithType, UpdateStages.WithTypeHandlerVersion, UpdateStages.WithEnableAutomaticUpgrade, + UpdateStages.WithAutoUpgradeMinorVersion, UpdateStages.WithSettings, UpdateStages.WithProtectedSettings { /** * Executes the update request. - * + * * @return the updated resource. */ MachineExtension apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ MachineExtension apply(Context context); } - /** The MachineExtension update stages. */ + /** + * The MachineExtension update stages. + */ interface UpdateStages { - /** The stage of the MachineExtension update allowing to specify tags. */ + /** + * The stage of the MachineExtension 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 MachineExtension update allowing to specify forceUpdateTag. */ + /** + * The stage of the MachineExtension update allowing to specify forceUpdateTag. + */ interface WithForceUpdateTag { /** * Specifies the forceUpdateTag property: How the extension handler should be forced to update even if the * extension configuration has not changed.. - * + * * @param forceUpdateTag How the extension handler should be forced to update even if the extension - * configuration has not changed. + * configuration has not changed. * @return the next definition stage. */ Update withForceUpdateTag(String forceUpdateTag); } - /** The stage of the MachineExtension update allowing to specify publisher. */ + /** + * The stage of the MachineExtension update allowing to specify publisher. + */ interface WithPublisher { /** * Specifies the publisher property: The name of the extension handler publisher.. - * + * * @param publisher The name of the extension handler publisher. * @return the next definition stage. */ Update withPublisher(String publisher); } - /** The stage of the MachineExtension update allowing to specify type. */ + /** + * The stage of the MachineExtension update allowing to specify type. + */ interface WithType { /** * Specifies the type property: Specifies the type of the extension; an example is "CustomScriptExtension".. - * + * * @param type Specifies the type of the extension; an example is "CustomScriptExtension". * @return the next definition stage. */ Update withType(String type); } - /** The stage of the MachineExtension update allowing to specify typeHandlerVersion. */ + /** + * The stage of the MachineExtension update allowing to specify typeHandlerVersion. + */ interface WithTypeHandlerVersion { /** * Specifies the typeHandlerVersion property: Specifies the version of the script handler.. - * + * * @param typeHandlerVersion Specifies the version of the script handler. * @return the next definition stage. */ Update withTypeHandlerVersion(String typeHandlerVersion); } - /** The stage of the MachineExtension update allowing to specify enableAutomaticUpgrade. */ + /** + * The stage of the MachineExtension update allowing to specify enableAutomaticUpgrade. + */ interface WithEnableAutomaticUpgrade { /** * Specifies the enableAutomaticUpgrade property: Indicates whether the extension should be automatically * upgraded by the platform if there is a newer version available.. - * + * * @param enableAutomaticUpgrade Indicates whether the extension should be automatically upgraded by the - * platform if there is a newer version available. + * platform if there is a newer version available. * @return the next definition stage. */ Update withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade); } - /** The stage of the MachineExtension update allowing to specify autoUpgradeMinorVersion. */ + /** + * The stage of the MachineExtension update allowing to specify autoUpgradeMinorVersion. + */ interface WithAutoUpgradeMinorVersion { /** * Specifies the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor * version if one is available at deployment time. Once deployed, however, the extension will not upgrade * minor versions unless redeployed, even with this property set to true.. - * + * * @param autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is - * available at deployment time. Once deployed, however, the extension will not upgrade minor versions - * unless redeployed, even with this property set to true. + * available at deployment time. Once deployed, however, the extension will not upgrade minor versions + * unless redeployed, even with this property set to true. * @return the next definition stage. */ Update withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion); } - /** The stage of the MachineExtension update allowing to specify settings. */ + /** + * The stage of the MachineExtension update allowing to specify settings. + */ interface WithSettings { /** * Specifies the settings property: Json formatted public settings for the extension.. - * + * * @param settings Json formatted public settings for the extension. * @return the next definition stage. */ Update withSettings(Map settings); } - /** The stage of the MachineExtension update allowing to specify protectedSettings. */ + /** + * The stage of the MachineExtension update allowing to specify protectedSettings. + */ interface WithProtectedSettings { /** * Specifies the protectedSettings property: The extension can contain either protectedSettings or * protectedSettingsFromKeyVault or no protected settings at all.. - * + * * @param protectedSettings The extension can contain either protectedSettings or - * protectedSettingsFromKeyVault or no protected settings at all. + * protectedSettingsFromKeyVault or no protected settings at all. * @return the next definition stage. */ Update withProtectedSettings(Map protectedSettings); @@ -326,14 +354,14 @@ interface WithProtectedSettings { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ MachineExtension refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceView.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceView.java index 9e7df08f67dc..e76c6b25302c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceView.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceView.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the Machine Extension Instance View. */ +/** + * Describes the Machine Extension Instance View. + */ @Fluent public final class MachineExtensionInstanceView { /* @@ -34,13 +36,15 @@ public final class MachineExtensionInstanceView { @JsonProperty(value = "status") private MachineExtensionInstanceViewStatus status; - /** Creates an instance of MachineExtensionInstanceView class. */ + /** + * Creates an instance of MachineExtensionInstanceView class. + */ public MachineExtensionInstanceView() { } /** * Get the name property: The machine extension name. - * + * * @return the name value. */ public String name() { @@ -49,7 +53,7 @@ public String name() { /** * Set the name property: The machine extension name. - * + * * @param name the name value to set. * @return the MachineExtensionInstanceView object itself. */ @@ -60,7 +64,7 @@ public MachineExtensionInstanceView withName(String name) { /** * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension". - * + * * @return the type value. */ public String type() { @@ -69,7 +73,7 @@ public String type() { /** * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension". - * + * * @param type the type value to set. * @return the MachineExtensionInstanceView object itself. */ @@ -80,7 +84,7 @@ public MachineExtensionInstanceView withType(String type) { /** * Get the typeHandlerVersion property: Specifies the version of the script handler. - * + * * @return the typeHandlerVersion value. */ public String typeHandlerVersion() { @@ -89,7 +93,7 @@ public String typeHandlerVersion() { /** * Set the typeHandlerVersion property: Specifies the version of the script handler. - * + * * @param typeHandlerVersion the typeHandlerVersion value to set. * @return the MachineExtensionInstanceView object itself. */ @@ -100,7 +104,7 @@ public MachineExtensionInstanceView withTypeHandlerVersion(String typeHandlerVer /** * Get the status property: Instance view status. - * + * * @return the status value. */ public MachineExtensionInstanceViewStatus status() { @@ -109,7 +113,7 @@ public MachineExtensionInstanceViewStatus status() { /** * Set the status property: Instance view status. - * + * * @param status the status value to set. * @return the MachineExtensionInstanceView object itself. */ @@ -120,7 +124,7 @@ public MachineExtensionInstanceView withStatus(MachineExtensionInstanceViewStatu /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceViewStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceViewStatus.java index ea4080955348..239911304f19 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceViewStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionInstanceViewStatus.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Instance view status. */ +/** + * Instance view status. + */ @Fluent public final class MachineExtensionInstanceViewStatus { /* @@ -41,13 +43,15 @@ public final class MachineExtensionInstanceViewStatus { @JsonProperty(value = "time") private OffsetDateTime time; - /** Creates an instance of MachineExtensionInstanceViewStatus class. */ + /** + * Creates an instance of MachineExtensionInstanceViewStatus class. + */ public MachineExtensionInstanceViewStatus() { } /** * Get the code property: The status code. - * + * * @return the code value. */ public String code() { @@ -56,7 +60,7 @@ public String code() { /** * Set the code property: The status code. - * + * * @param code the code value to set. * @return the MachineExtensionInstanceViewStatus object itself. */ @@ -67,7 +71,7 @@ public MachineExtensionInstanceViewStatus withCode(String code) { /** * Get the level property: The level code. - * + * * @return the level value. */ public StatusLevelTypes level() { @@ -76,7 +80,7 @@ public StatusLevelTypes level() { /** * Set the level property: The level code. - * + * * @param level the level value to set. * @return the MachineExtensionInstanceViewStatus object itself. */ @@ -87,7 +91,7 @@ public MachineExtensionInstanceViewStatus withLevel(StatusLevelTypes level) { /** * Get the displayStatus property: The short localizable label for the status. - * + * * @return the displayStatus value. */ public String displayStatus() { @@ -96,7 +100,7 @@ public String displayStatus() { /** * Set the displayStatus property: The short localizable label for the status. - * + * * @param displayStatus the displayStatus value to set. * @return the MachineExtensionInstanceViewStatus object itself. */ @@ -107,7 +111,7 @@ public MachineExtensionInstanceViewStatus withDisplayStatus(String displayStatus /** * Get the message property: The detailed status message, including for alerts and error messages. - * + * * @return the message value. */ public String message() { @@ -116,7 +120,7 @@ public String message() { /** * Set the message property: The detailed status message, including for alerts and error messages. - * + * * @param message the message value to set. * @return the MachineExtensionInstanceViewStatus object itself. */ @@ -127,7 +131,7 @@ public MachineExtensionInstanceViewStatus withMessage(String message) { /** * Get the time property: The time of the status. - * + * * @return the time value. */ public OffsetDateTime time() { @@ -136,7 +140,7 @@ public OffsetDateTime time() { /** * Set the time property: The time of the status. - * + * * @param time the time value to set. * @return the MachineExtensionInstanceViewStatus object itself. */ @@ -147,7 +151,7 @@ public MachineExtensionInstanceViewStatus withTime(OffsetDateTime time) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionProperties.java index ccd2204fff54..6a56eadd47fc 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Describes the properties of a Machine Extension. */ +/** + * Describes the properties of a Machine Extension. + */ @Fluent public final class MachineExtensionProperties { /* @@ -37,16 +39,13 @@ public final class MachineExtensionProperties { private String typeHandlerVersion; /* - * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version - * available. + * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. */ @JsonProperty(value = "enableAutomaticUpgrade") private Boolean enableAutomaticUpgrade; /* - * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once - * deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set - * to true. + * Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. */ @JsonProperty(value = "autoUpgradeMinorVersion") private Boolean autoUpgradeMinorVersion; @@ -59,8 +58,7 @@ public final class MachineExtensionProperties { private Map settings; /* - * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at - * all. + * The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. */ @JsonProperty(value = "protectedSettings") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -78,14 +76,16 @@ public final class MachineExtensionProperties { @JsonProperty(value = "instanceView") private MachineExtensionInstanceView instanceView; - /** Creates an instance of MachineExtensionProperties class. */ + /** + * Creates an instance of MachineExtensionProperties class. + */ public MachineExtensionProperties() { } /** * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension * configuration has not changed. - * + * * @return the forceUpdateTag value. */ public String forceUpdateTag() { @@ -95,7 +95,7 @@ public String forceUpdateTag() { /** * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension * configuration has not changed. - * + * * @param forceUpdateTag the forceUpdateTag value to set. * @return the MachineExtensionProperties object itself. */ @@ -106,7 +106,7 @@ public MachineExtensionProperties withForceUpdateTag(String forceUpdateTag) { /** * Get the publisher property: The name of the extension handler publisher. - * + * * @return the publisher value. */ public String publisher() { @@ -115,7 +115,7 @@ public String publisher() { /** * Set the publisher property: The name of the extension handler publisher. - * + * * @param publisher the publisher value to set. * @return the MachineExtensionProperties object itself. */ @@ -126,7 +126,7 @@ public MachineExtensionProperties withPublisher(String publisher) { /** * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension". - * + * * @return the type value. */ public String type() { @@ -135,7 +135,7 @@ public String type() { /** * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension". - * + * * @param type the type value to set. * @return the MachineExtensionProperties object itself. */ @@ -146,7 +146,7 @@ public MachineExtensionProperties withType(String type) { /** * Get the typeHandlerVersion property: Specifies the version of the script handler. - * + * * @return the typeHandlerVersion value. */ public String typeHandlerVersion() { @@ -155,7 +155,7 @@ public String typeHandlerVersion() { /** * Set the typeHandlerVersion property: Specifies the version of the script handler. - * + * * @param typeHandlerVersion the typeHandlerVersion value to set. * @return the MachineExtensionProperties object itself. */ @@ -167,7 +167,7 @@ public MachineExtensionProperties withTypeHandlerVersion(String typeHandlerVersi /** * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the * platform if there is a newer version available. - * + * * @return the enableAutomaticUpgrade value. */ public Boolean enableAutomaticUpgrade() { @@ -177,7 +177,7 @@ public Boolean enableAutomaticUpgrade() { /** * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the * platform if there is a newer version available. - * + * * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. * @return the MachineExtensionProperties object itself. */ @@ -190,7 +190,7 @@ public MachineExtensionProperties withEnableAutomaticUpgrade(Boolean enableAutom * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless * redeployed, even with this property set to true. - * + * * @return the autoUpgradeMinorVersion value. */ public Boolean autoUpgradeMinorVersion() { @@ -201,7 +201,7 @@ public Boolean autoUpgradeMinorVersion() { * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless * redeployed, even with this property set to true. - * + * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. * @return the MachineExtensionProperties object itself. */ @@ -212,7 +212,7 @@ public MachineExtensionProperties withAutoUpgradeMinorVersion(Boolean autoUpgrad /** * Get the settings property: Json formatted public settings for the extension. - * + * * @return the settings value. */ public Map settings() { @@ -221,7 +221,7 @@ public Map settings() { /** * Set the settings property: Json formatted public settings for the extension. - * + * * @param settings the settings value to set. * @return the MachineExtensionProperties object itself. */ @@ -233,7 +233,7 @@ public MachineExtensionProperties withSettings(Map settings) { /** * Get the protectedSettings property: The extension can contain either protectedSettings or * protectedSettingsFromKeyVault or no protected settings at all. - * + * * @return the protectedSettings value. */ public Map protectedSettings() { @@ -243,7 +243,7 @@ public Map protectedSettings() { /** * Set the protectedSettings property: The extension can contain either protectedSettings or * protectedSettingsFromKeyVault or no protected settings at all. - * + * * @param protectedSettings the protectedSettings value to set. * @return the MachineExtensionProperties object itself. */ @@ -254,7 +254,7 @@ public MachineExtensionProperties withProtectedSettings(Map prot /** * Get the provisioningState property: The provisioning state, which only appears in the response. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -263,7 +263,7 @@ public String provisioningState() { /** * Get the instanceView property: The machine extension instance view. - * + * * @return the instanceView value. */ public MachineExtensionInstanceView instanceView() { @@ -272,7 +272,7 @@ public MachineExtensionInstanceView instanceView() { /** * Set the instanceView property: The machine extension instance view. - * + * * @param instanceView the instanceView value to set. * @return the MachineExtensionProperties object itself. */ @@ -283,7 +283,7 @@ public MachineExtensionProperties withInstanceView(MachineExtensionInstanceView /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpdate.java index 3931bb1c5bfb..20c4a5fc913e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpdate.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Describes a Machine Extension Update. */ +/** + * Describes a Machine Extension Update. + */ @Fluent public final class MachineExtensionUpdate extends ResourceUpdate { /* @@ -18,20 +20,24 @@ public final class MachineExtensionUpdate extends ResourceUpdate { @JsonProperty(value = "properties") private MachineExtensionUpdateProperties innerProperties; - /** Creates an instance of MachineExtensionUpdate class. */ + /** + * Creates an instance of MachineExtensionUpdate class. + */ public MachineExtensionUpdate() { } /** * Get the innerProperties property: Describes Machine Extension Update Properties. - * + * * @return the innerProperties value. */ private MachineExtensionUpdateProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MachineExtensionUpdate withTags(Map tags) { super.withTags(tags); @@ -41,7 +47,7 @@ public MachineExtensionUpdate withTags(Map tags) { /** * Get the forceUpdateTag property: How the extension handler should be forced to update even if the extension * configuration has not changed. - * + * * @return the forceUpdateTag value. */ public String forceUpdateTag() { @@ -51,7 +57,7 @@ public String forceUpdateTag() { /** * Set the forceUpdateTag property: How the extension handler should be forced to update even if the extension * configuration has not changed. - * + * * @param forceUpdateTag the forceUpdateTag value to set. * @return the MachineExtensionUpdate object itself. */ @@ -65,7 +71,7 @@ public MachineExtensionUpdate withForceUpdateTag(String forceUpdateTag) { /** * Get the publisher property: The name of the extension handler publisher. - * + * * @return the publisher value. */ public String publisher() { @@ -74,7 +80,7 @@ public String publisher() { /** * Set the publisher property: The name of the extension handler publisher. - * + * * @param publisher the publisher value to set. * @return the MachineExtensionUpdate object itself. */ @@ -88,7 +94,7 @@ public MachineExtensionUpdate withPublisher(String publisher) { /** * Get the type property: Specifies the type of the extension; an example is "CustomScriptExtension". - * + * * @return the type value. */ public String type() { @@ -97,7 +103,7 @@ public String type() { /** * Set the type property: Specifies the type of the extension; an example is "CustomScriptExtension". - * + * * @param type the type value to set. * @return the MachineExtensionUpdate object itself. */ @@ -111,7 +117,7 @@ public MachineExtensionUpdate withType(String type) { /** * Get the typeHandlerVersion property: Specifies the version of the script handler. - * + * * @return the typeHandlerVersion value. */ public String typeHandlerVersion() { @@ -120,7 +126,7 @@ public String typeHandlerVersion() { /** * Set the typeHandlerVersion property: Specifies the version of the script handler. - * + * * @param typeHandlerVersion the typeHandlerVersion value to set. * @return the MachineExtensionUpdate object itself. */ @@ -135,7 +141,7 @@ public MachineExtensionUpdate withTypeHandlerVersion(String typeHandlerVersion) /** * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the * platform if there is a newer version available. - * + * * @return the enableAutomaticUpgrade value. */ public Boolean enableAutomaticUpgrade() { @@ -145,7 +151,7 @@ public Boolean enableAutomaticUpgrade() { /** * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the * platform if there is a newer version available. - * + * * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. * @return the MachineExtensionUpdate object itself. */ @@ -161,7 +167,7 @@ public MachineExtensionUpdate withEnableAutomaticUpgrade(Boolean enableAutomatic * Get the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless * redeployed, even with this property set to true. - * + * * @return the autoUpgradeMinorVersion value. */ public Boolean autoUpgradeMinorVersion() { @@ -172,7 +178,7 @@ public Boolean autoUpgradeMinorVersion() { * Set the autoUpgradeMinorVersion property: Indicates whether the extension should use a newer minor version if one * is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless * redeployed, even with this property set to true. - * + * * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. * @return the MachineExtensionUpdate object itself. */ @@ -186,7 +192,7 @@ public MachineExtensionUpdate withAutoUpgradeMinorVersion(Boolean autoUpgradeMin /** * Get the settings property: Json formatted public settings for the extension. - * + * * @return the settings value. */ public Map settings() { @@ -195,7 +201,7 @@ public Map settings() { /** * Set the settings property: Json formatted public settings for the extension. - * + * * @param settings the settings value to set. * @return the MachineExtensionUpdate object itself. */ @@ -210,7 +216,7 @@ public MachineExtensionUpdate withSettings(Map settings) { /** * Get the protectedSettings property: The extension can contain either protectedSettings or * protectedSettingsFromKeyVault or no protected settings at all. - * + * * @return the protectedSettings value. */ public Map protectedSettings() { @@ -220,7 +226,7 @@ public Map protectedSettings() { /** * Set the protectedSettings property: The extension can contain either protectedSettings or * protectedSettingsFromKeyVault or no protected settings at all. - * + * * @param protectedSettings the protectedSettings value to set. * @return the MachineExtensionUpdate object itself. */ @@ -234,7 +240,7 @@ public MachineExtensionUpdate withProtectedSettings(Map protecte /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpgrade.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpgrade.java index e6948cd70ddc..73a120407660 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpgrade.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionUpgrade.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Describes the Machine Extension Upgrade Properties. */ +/** + * Describes the Machine Extension Upgrade Properties. + */ @Fluent public final class MachineExtensionUpgrade { /* @@ -19,13 +21,15 @@ public final class MachineExtensionUpgrade { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map extensionTargets; - /** Creates an instance of MachineExtensionUpgrade class. */ + /** + * Creates an instance of MachineExtensionUpgrade class. + */ public MachineExtensionUpgrade() { } /** * Get the extensionTargets property: Describes the Extension Target Properties. - * + * * @return the extensionTargets value. */ public Map extensionTargets() { @@ -34,7 +38,7 @@ public Map extensionTargets() { /** * Set the extensionTargets property: Describes the Extension Target Properties. - * + * * @param extensionTargets the extensionTargets value to set. * @return the MachineExtensionUpgrade object itself. */ @@ -45,19 +49,16 @@ public MachineExtensionUpgrade withExtensionTargets(Map { - if (e != null) { - e.validate(); - } - }); + extensionTargets().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensions.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensions.java index 255714cd384b..6a049ba7baf0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensions.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensions.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of MachineExtensions. */ +/** + * Resource collection API of MachineExtensions. + */ public interface MachineExtensions { /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -24,7 +26,7 @@ public interface MachineExtensions { /** * The operation to delete the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine where the extension should be deleted. * @param extensionName The name of the machine extension. @@ -37,7 +39,7 @@ public interface MachineExtensions { /** * The operation to get the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. @@ -47,12 +49,12 @@ public interface MachineExtensions { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a Machine Extension along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String machineName, String extensionName, Context context); + Response getWithResponse(String resourceGroupName, String machineName, String extensionName, + Context context); /** * The operation to get the extension. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. @@ -65,7 +67,7 @@ Response getWithResponse( /** * The operation to get all extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -77,7 +79,7 @@ Response getWithResponse( /** * The operation to get all extensions of a non-Azure machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param expand The expand expression to apply on the operation. @@ -91,7 +93,7 @@ Response getWithResponse( /** * The operation to get the extension. - * + * * @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. @@ -102,7 +104,7 @@ Response getWithResponse( /** * The operation to get the extension. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -114,7 +116,7 @@ Response getWithResponse( /** * The operation to delete the extension. - * + * * @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. @@ -124,7 +126,7 @@ Response getWithResponse( /** * The operation to delete the extension. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -135,7 +137,7 @@ Response getWithResponse( /** * Begins definition for a new MachineExtension resource. - * + * * @param name resource name. * @return the first stage of the new MachineExtension definition. */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionsListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionsListResult.java index 36e1ac43e505..d4188676c08f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionsListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineExtensionsListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes the Machine Extensions List Result. */ +/** + * Describes the Machine Extensions List Result. + */ @Fluent public final class MachineExtensionsListResult { /* @@ -19,19 +21,20 @@ public final class MachineExtensionsListResult { private List value; /* - * The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of - * extensions. + * The uri to fetch the next page of machine extensions. Call ListNext() with this to fetch the next page of extensions. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of MachineExtensionsListResult class. */ + /** + * Creates an instance of MachineExtensionsListResult class. + */ public MachineExtensionsListResult() { } /** * Get the value property: The list of extensions. - * + * * @return the value value. */ public List value() { @@ -40,7 +43,7 @@ public List value() { /** * Set the value property: The list of extensions. - * + * * @param value the value value to set. * @return the MachineExtensionsListResult object itself. */ @@ -52,7 +55,7 @@ public MachineExtensionsListResult withValue(List value) /** * Get the nextLink property: The uri to fetch the next page of machine extensions. Call ListNext() with this to * fetch the next page of extensions. - * + * * @return the nextLink value. */ public String nextLink() { @@ -62,7 +65,7 @@ public String nextLink() { /** * Set the nextLink property: The uri to fetch the next page of machine extensions. Call ListNext() with this to * fetch the next page of extensions. - * + * * @param nextLink the nextLink value to set. * @return the MachineExtensionsListResult object itself. */ @@ -73,7 +76,7 @@ public MachineExtensionsListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesParameters.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesParameters.java index d61063c4e9b9..0014469de144 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesParameters.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesParameters.java @@ -7,16 +7,18 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.Duration; -/** Input for InstallPatches as directly received by the API. */ +/** + * Input for InstallPatches as directly received by the API. + */ @Fluent public final class MachineInstallPatchesParameters { /* - * Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration - * string such as PT4H (4 hours) + * Specifies the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours) */ @JsonProperty(value = "maximumDuration", required = true) - private String maximumDuration; + private Duration maximumDuration; /* * Defines when it is acceptable to reboot a VM during a software update operation. @@ -36,35 +38,37 @@ public final class MachineInstallPatchesParameters { @JsonProperty(value = "linuxParameters") private LinuxParameters linuxParameters; - /** Creates an instance of MachineInstallPatchesParameters class. */ + /** + * Creates an instance of MachineInstallPatchesParameters class. + */ public MachineInstallPatchesParameters() { } /** * Get the maximumDuration property: Specifies the maximum amount of time that the operation will run. It must be an * ISO 8601-compliant duration string such as PT4H (4 hours). - * + * * @return the maximumDuration value. */ - public String maximumDuration() { + public Duration maximumDuration() { return this.maximumDuration; } /** * Set the maximumDuration property: Specifies the maximum amount of time that the operation will run. It must be an * ISO 8601-compliant duration string such as PT4H (4 hours). - * + * * @param maximumDuration the maximumDuration value to set. * @return the MachineInstallPatchesParameters object itself. */ - public MachineInstallPatchesParameters withMaximumDuration(String maximumDuration) { + public MachineInstallPatchesParameters withMaximumDuration(Duration maximumDuration) { this.maximumDuration = maximumDuration; return this; } /** * Get the rebootSetting property: Defines when it is acceptable to reboot a VM during a software update operation. - * + * * @return the rebootSetting value. */ public VMGuestPatchRebootSetting rebootSetting() { @@ -73,7 +77,7 @@ public VMGuestPatchRebootSetting rebootSetting() { /** * Set the rebootSetting property: Defines when it is acceptable to reboot a VM during a software update operation. - * + * * @param rebootSetting the rebootSetting value to set. * @return the MachineInstallPatchesParameters object itself. */ @@ -84,7 +88,7 @@ public MachineInstallPatchesParameters withRebootSetting(VMGuestPatchRebootSetti /** * Get the windowsParameters property: Input for InstallPatches on a Windows VM, as directly received by the API. - * + * * @return the windowsParameters value. */ public WindowsParameters windowsParameters() { @@ -93,7 +97,7 @@ public WindowsParameters windowsParameters() { /** * Set the windowsParameters property: Input for InstallPatches on a Windows VM, as directly received by the API. - * + * * @param windowsParameters the windowsParameters value to set. * @return the MachineInstallPatchesParameters object itself. */ @@ -104,7 +108,7 @@ public MachineInstallPatchesParameters withWindowsParameters(WindowsParameters w /** * Get the linuxParameters property: Input for InstallPatches on a Linux VM, as directly received by the API. - * + * * @return the linuxParameters value. */ public LinuxParameters linuxParameters() { @@ -113,7 +117,7 @@ public LinuxParameters linuxParameters() { /** * Set the linuxParameters property: Input for InstallPatches on a Linux VM, as directly received by the API. - * + * * @param linuxParameters the linuxParameters value to set. * @return the MachineInstallPatchesParameters object itself. */ @@ -124,21 +128,19 @@ public MachineInstallPatchesParameters withLinuxParameters(LinuxParameters linux /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (maximumDuration() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property maximumDuration in model MachineInstallPatchesParameters")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property maximumDuration in model MachineInstallPatchesParameters")); } if (rebootSetting() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property rebootSetting in model MachineInstallPatchesParameters")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property rebootSetting in model MachineInstallPatchesParameters")); } if (windowsParameters() != null) { windowsParameters().validate(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesResult.java index 220f2760923f..a53fe37c78cd 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineInstallPatchesResult.java @@ -8,27 +8,29 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.MachineInstallPatchesResultInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of MachineInstallPatchesResult. */ +/** + * An immutable client-side representation of MachineInstallPatchesResult. + */ public interface MachineInstallPatchesResult { /** * Gets the status property: The overall success or failure status of the operation. It remains "InProgress" until * the operation completes. At that point it will become "Failed", "Succeeded", "Unknown" or * "CompletedWithWarnings.". - * + * * @return the status value. */ PatchOperationStatus status(); /** * Gets the installationActivityId property: The activity ID of the operation that produced this result. - * + * * @return the installationActivityId value. */ String installationActivityId(); /** * Gets the rebootStatus property: The reboot state of the VM following completion of the operation. - * + * * @return the rebootStatus value. */ VMGuestPatchRebootStatus rebootStatus(); @@ -36,7 +38,7 @@ public interface MachineInstallPatchesResult { /** * Gets the maintenanceWindowExceeded property: Whether the operation ran out of time before it completed all its * intended actions. - * + * * @return the maintenanceWindowExceeded value. */ Boolean maintenanceWindowExceeded(); @@ -44,7 +46,7 @@ public interface MachineInstallPatchesResult { /** * Gets the excludedPatchCount property: The number of patches that were not installed due to the user blocking * their installation. - * + * * @return the excludedPatchCount value. */ Integer excludedPatchCount(); @@ -52,7 +54,7 @@ public interface MachineInstallPatchesResult { /** * Gets the notSelectedPatchCount property: The number of patches that were detected as available for install, but * did not meet the operation's criteria. - * + * * @return the notSelectedPatchCount value. */ Integer notSelectedPatchCount(); @@ -60,14 +62,14 @@ public interface MachineInstallPatchesResult { /** * Gets the pendingPatchCount property: The number of patches that were identified as meeting the installation * criteria, but were not able to be installed. Typically this happens when maintenanceWindowExceeded == true. - * + * * @return the pendingPatchCount value. */ Integer pendingPatchCount(); /** * Gets the installedPatchCount property: The number of patches successfully installed. - * + * * @return the installedPatchCount value. */ Integer installedPatchCount(); @@ -75,42 +77,42 @@ public interface MachineInstallPatchesResult { /** * Gets the failedPatchCount property: The number of patches that could not be installed due to some issue. See * errors for details. - * + * * @return the failedPatchCount value. */ Integer failedPatchCount(); /** * Gets the startDateTime property: The UTC timestamp when the operation began. - * + * * @return the startDateTime value. */ OffsetDateTime startDateTime(); /** * Gets the lastModifiedDateTime property: The UTC timestamp when the operation finished. - * + * * @return the lastModifiedDateTime value. */ OffsetDateTime lastModifiedDateTime(); /** * Gets the startedBy property: Indicates if operation was triggered by user or by platform. - * + * * @return the startedBy value. */ PatchOperationStartedBy startedBy(); /** * Gets the patchServiceUsed property: Specifies the patch service used for the operation. - * + * * @return the patchServiceUsed value. */ PatchServiceUsed patchServiceUsed(); /** * Gets the osType property: The operating system type of the machine. - * + * * @return the osType value. */ OsType osType(); @@ -118,14 +120,14 @@ public interface MachineInstallPatchesResult { /** * Gets the errorDetails property: The errors that were encountered during execution of the operation. The details * array contains the list of them. - * + * * @return the errorDetails value. */ ManagementError errorDetails(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.MachineInstallPatchesResultInner object. - * + * * @return the inner object. */ MachineInstallPatchesResultInner innerModel(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineListResult.java index c2f873d2798b..d3a484ffa33d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineListResult.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The List hybrid machine operation response. */ +/** + * The List hybrid machine operation response. + */ @Fluent public final class MachineListResult { /* @@ -20,19 +22,20 @@ public final class MachineListResult { private List value; /* - * The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of hybrid - * machines. + * The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the next page of hybrid machines. */ @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of MachineListResult class. */ + /** + * Creates an instance of MachineListResult class. + */ public MachineListResult() { } /** * Get the value property: The list of hybrid machines. - * + * * @return the value value. */ public List value() { @@ -41,7 +44,7 @@ public List value() { /** * Set the value property: The list of hybrid machines. - * + * * @param value the value value to set. * @return the MachineListResult object itself. */ @@ -53,7 +56,7 @@ public MachineListResult withValue(List value) { /** * Get the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the * next page of hybrid machines. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +66,7 @@ public String nextLink() { /** * Set the nextLink property: The URI to fetch the next page of Machines. Call ListNext() with this URI to fetch the * next page of hybrid machines. - * + * * @param nextLink the nextLink value to set. * @return the MachineListResult object itself. */ @@ -74,14 +77,13 @@ public MachineListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model MachineListResult")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model MachineListResult")); } else { value().forEach(e -> e.validate()); } 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 1ae7d4f535f8..d8a8a5033a6f 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 @@ -9,12 +9,15 @@ import java.time.OffsetDateTime; import java.util.List; import java.util.Map; +import java.util.UUID; -/** An immutable client-side representation of MachineProperties. */ +/** + * An immutable client-side representation of MachineProperties. + */ public interface MachineProperties { /** * Gets the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @return the locationData value. */ LocationData locationData(); @@ -22,98 +25,98 @@ public interface MachineProperties { /** * Gets the agentConfiguration property: Configurable properties that the user can set locally via the azcmagent * config command, or remotely via ARM. - * + * * @return the agentConfiguration value. */ AgentConfiguration agentConfiguration(); /** * Gets the serviceStatuses property: Statuses of dependent services that are reported back to ARM. - * + * * @return the serviceStatuses value. */ ServiceStatuses serviceStatuses(); /** * Gets the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @return the cloudMetadata value. */ CloudMetadata cloudMetadata(); /** * Gets the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @return the agentUpgrade value. */ AgentUpgrade agentUpgrade(); /** * Gets the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @return the osProfile value. */ OSProfile osProfile(); /** - * Gets the licenseProfile property: Specifies the ESU related properties for a machine. - * + * Gets the licenseProfile property: Specifies the License related properties for a machine. + * * @return the licenseProfile value. */ LicenseProfileMachineInstanceView licenseProfile(); /** * Gets the provisioningState property: The provisioning state, which only appears in the response. - * + * * @return the provisioningState value. */ String provisioningState(); /** * Gets the status property: The status of the hybrid machine agent. - * + * * @return the status value. */ StatusTypes status(); /** * Gets the lastStatusChange property: The time of the last status change. - * + * * @return the lastStatusChange value. */ OffsetDateTime lastStatusChange(); /** * Gets the errorDetails property: Details about the error state. - * + * * @return the errorDetails value. */ List errorDetails(); /** * Gets the agentVersion property: The hybrid machine agent full version. - * + * * @return the agentVersion value. */ String agentVersion(); /** * Gets the vmId property: Specifies the hybrid machine unique ID. - * + * * @return the vmId value. */ - String vmId(); + UUID vmId(); /** * Gets the displayName property: Specifies the hybrid machine display name. - * + * * @return the displayName value. */ String displayName(); /** * Gets the machineFqdn property: Specifies the hybrid machine FQDN. - * + * * @return the machineFqdn value. */ String machineFqdn(); @@ -121,70 +124,77 @@ public interface MachineProperties { /** * Gets the clientPublicKey property: Public Key that the client provides to be used during initial resource * onboarding. - * + * * @return the clientPublicKey value. */ String clientPublicKey(); /** * Gets the osName property: The Operating System running on the hybrid machine. - * + * * @return the osName value. */ String osName(); /** * Gets the osVersion property: The version of Operating System running on the hybrid machine. - * + * * @return the osVersion value. */ String osVersion(); /** * Gets the osType property: The type of Operating System (windows/linux). - * + * * @return the osType value. */ String osType(); /** * Gets the vmUuid property: Specifies the Arc Machine's unique SMBIOS ID. - * + * * @return the vmUuid value. */ - String vmUuid(); + UUID vmUuid(); /** * Gets the extensions property: Machine Extensions information (deprecated field). - * + * * @return the extensions value. */ List extensions(); /** * Gets the osSku property: Specifies the Operating System product SKU. - * + * * @return the osSku value. */ String osSku(); + /** + * Gets the osEdition property: The edition of the Operating System. + * + * @return the osEdition value. + */ + String osEdition(); + /** * Gets the domainName property: Specifies the Windows domain name. - * + * * @return the domainName value. */ String domainName(); /** * Gets the adFqdn property: Specifies the AD fully qualified display name. - * + * * @return the adFqdn value. */ String adFqdn(); /** * Gets the dnsFqdn property: Specifies the DNS fully qualified display name. - * + * * @return the dnsFqdn value. */ String dnsFqdn(); @@ -192,7 +202,7 @@ public interface MachineProperties { /** * Gets the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @return the privateLinkScopeResourceId value. */ String privateLinkScopeResourceId(); @@ -200,35 +210,35 @@ public interface MachineProperties { /** * Gets the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @return the parentClusterResourceId value. */ String parentClusterResourceId(); /** * Gets the mssqlDiscovered property: Specifies whether any MS SQL instance is discovered on the machine. - * + * * @return the mssqlDiscovered value. */ String mssqlDiscovered(); /** * Gets the detectedProperties property: Detected properties from the machine. - * + * * @return the detectedProperties value. */ Map detectedProperties(); /** * Gets the networkProfile property: Information about the network the machine is on. - * + * * @return the networkProfile value. */ NetworkProfile networkProfile(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.MachinePropertiesInner object. - * + * * @return the inner object. */ MachinePropertiesInner innerModel(); 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 000000000000..c0aef58885f8 --- /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 000000000000..a87d32f052f2 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandInstanceView.java @@ -0,0 +1,241 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** + * The instance view of a machine run command. + */ +@Fluent +public final class MachineRunCommandInstanceView { + /* + * Script execution status. + */ + @JsonProperty(value = "executionState") + private ExecutionState executionState; + + /* + * Communicate script configuration errors or execution messages. + */ + @JsonProperty(value = "executionMessage") + private String executionMessage; + + /* + * Exit code returned from script execution. + */ + @JsonProperty(value = "exitCode") + private Integer exitCode; + + /* + * Script output stream. + */ + @JsonProperty(value = "output") + private String output; + + /* + * Script error stream. + */ + @JsonProperty(value = "error") + private String error; + + /* + * Script start time. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * Script end time. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * The status information. + */ + @JsonProperty(value = "statuses") + 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()); + } + } +} 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 000000000000..5c5808dd1ff0 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandScriptSource.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the script sources for run command. Use only one of script, scriptUri, commandId. + */ +@Fluent +public final class MachineRunCommandScriptSource { + /* + * Specifies the script content to be executed on the machine. + */ + @JsonProperty(value = "script") + 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. + */ + @JsonProperty(value = "scriptUri") + private String scriptUri; + + /* + * Specifies the commandId of predefined built-in script. + */ + @JsonProperty(value = "commandId") + 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. + */ + @JsonProperty(value = "scriptUriManagedIdentity") + 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(); + } + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandUpdate.java new file mode 100644 index 000000000000..5a9b2fbd69f4 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandUpdate.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.models; + +import com.azure.core.annotation.Fluent; +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() { + super.validate(); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfiles.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java similarity index 65% rename from sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfiles.java rename to sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java index b701bbad8908..4df336319cf8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/LicenseProfiles.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommands.java @@ -8,109 +8,115 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of LicenseProfiles. */ -public interface LicenseProfiles { +/** + * Resource collection API of MachineRunCommands. + */ +public interface MachineRunCommands { /** - * Retrieves information about the view of a license profile. - * + * 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 context The context to associate with this operation. + * @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 license profile in a hybrid machine along with {@link Response}. */ - Response getWithResponse(String resourceGroupName, String machineName, Context context); + void delete(String resourceGroupName, String machineName, String runCommandName); /** - * Retrieves information about the view of a license profile. - * + * The operation to delete a run command. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return describes a license profile in a hybrid machine. */ - LicenseProfile get(String resourceGroupName, String machineName); + void delete(String resourceGroupName, String machineName, String runCommandName, Context context); /** - * The operation to delete a license profile. - * + * The operation to get a run command. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. + * @param runCommandName The name of the run command. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes a Run Command along with {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String machineName); + Response getWithResponse(String resourceGroupName, String machineName, String runCommandName, + Context context); /** - * The operation to delete a license profile. - * + * 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 context The context to associate with this operation. + * @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. */ - void delete(String resourceGroupName, String machineName, Context context); + MachineRunCommand get(String resourceGroupName, String machineName, String runCommandName); /** - * The operation to get all license profiles of a non-Azure machine. - * + * 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 machine. + * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List hybrid machine license profile operation response as paginated response with {@link - * PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String machineName); + PagedIterable list(String resourceGroupName, String machineName); /** - * The operation to get all license profiles of a non-Azure machine. - * + * 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 machine. + * @param machineName The name of the hybrid machine. + * @param expand The expand expression to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List hybrid machine license profile operation response as paginated response with {@link - * PagedIterable}. + * @return describes the Run Commands List Result as paginated response with {@link PagedIterable}. */ - PagedIterable list(String resourceGroupName, String machineName, Context context); + PagedIterable list(String resourceGroupName, String machineName, String expand, Context context); /** - * Retrieves information about the view of a license profile. - * + * 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 license profile in a hybrid machine along with {@link Response}. + * @return describes a Run Command along with {@link Response}. */ - LicenseProfile getById(String id); + MachineRunCommand getById(String id); /** - * Retrieves information about the view of a license profile. - * + * 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 license profile in a hybrid machine along with {@link Response}. + * @return describes a Run Command along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + Response getByIdWithResponse(String id, Context context); /** - * The operation to delete a license profile. - * + * 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. @@ -119,8 +125,8 @@ public interface LicenseProfiles { void deleteById(String id); /** - * The operation to delete a license profile. - * + * 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. @@ -130,9 +136,10 @@ public interface LicenseProfiles { void deleteByIdWithResponse(String id, Context context); /** - * Begins definition for a new LicenseProfile resource. - * - * @return the first stage of the new LicenseProfile definition. + * Begins definition for a new MachineRunCommand resource. + * + * @param name resource name. + * @return the first stage of the new MachineRunCommand definition. */ - LicenseProfile.DefinitionStages.Blank define(); + 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 000000000000..2a1a71b33a2b --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineRunCommandsListResult.java @@ -0,0 +1,87 @@ +// 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.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Describes the Run Commands List Result. + */ +@Fluent +public final class MachineRunCommandsListResult { + /* + * The list of run commands + */ + @JsonProperty(value = "value") + 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. + */ + @JsonProperty(value = "nextLink") + 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()); + } + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineUpdate.java index f7bff12719a7..d832034f5a82 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/MachineUpdate.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Describes a hybrid machine Update. */ +/** + * Describes a hybrid machine Update. + */ @Fluent public final class MachineUpdate extends ResourceUpdate { /* @@ -30,13 +32,15 @@ public final class MachineUpdate extends ResourceUpdate { @JsonProperty(value = "properties") private MachineUpdateProperties innerProperties; - /** Creates an instance of MachineUpdate class. */ + /** + * Creates an instance of MachineUpdate class. + */ public MachineUpdate() { } /** * Get the identity property: Identity for the resource. - * + * * @return the identity value. */ public Identity identity() { @@ -45,7 +49,7 @@ public Identity identity() { /** * Set the identity property: Identity for the resource. - * + * * @param identity the identity value to set. * @return the MachineUpdate object itself. */ @@ -57,7 +61,7 @@ public MachineUpdate withIdentity(Identity identity) { /** * Get the kind property: Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware * etc. - * + * * @return the kind value. */ public ArcKindEnum kind() { @@ -67,7 +71,7 @@ public ArcKindEnum kind() { /** * Set the kind property: Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware * etc. - * + * * @param kind the kind value to set. * @return the MachineUpdate object itself. */ @@ -78,14 +82,16 @@ public MachineUpdate withKind(ArcKindEnum kind) { /** * Get the innerProperties property: Hybrid Compute Machine properties. - * + * * @return the innerProperties value. */ private MachineUpdateProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MachineUpdate withTags(Map tags) { super.withTags(tags); @@ -94,7 +100,7 @@ public MachineUpdate withTags(Map tags) { /** * Get the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @return the locationData value. */ public LocationData locationData() { @@ -103,7 +109,7 @@ public LocationData locationData() { /** * Set the locationData property: Metadata pertaining to the geographic location of the resource. - * + * * @param locationData the locationData value to set. * @return the MachineUpdate object itself. */ @@ -117,7 +123,7 @@ public MachineUpdate withLocationData(LocationData locationData) { /** * Get the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @return the osProfile value. */ public OSProfile osProfile() { @@ -126,7 +132,7 @@ public OSProfile osProfile() { /** * Set the osProfile property: Specifies the operating system settings for the hybrid machine. - * + * * @param osProfile the osProfile value to set. * @return the MachineUpdate object itself. */ @@ -140,7 +146,7 @@ public MachineUpdate withOsProfile(OSProfile osProfile) { /** * Get the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @return the cloudMetadata value. */ public CloudMetadata cloudMetadata() { @@ -149,7 +155,7 @@ public CloudMetadata cloudMetadata() { /** * Set the cloudMetadata property: The metadata of the cloud environment (Azure/GCP/AWS/OCI...). - * + * * @param cloudMetadata the cloudMetadata value to set. * @return the MachineUpdate object itself. */ @@ -163,7 +169,7 @@ public MachineUpdate withCloudMetadata(CloudMetadata cloudMetadata) { /** * Get the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @return the agentUpgrade value. */ public AgentUpgrade agentUpgrade() { @@ -172,7 +178,7 @@ public AgentUpgrade agentUpgrade() { /** * Set the agentUpgrade property: The info of the machine w.r.t Agent Upgrade. - * + * * @param agentUpgrade the agentUpgrade value to set. * @return the MachineUpdate object itself. */ @@ -187,7 +193,7 @@ public MachineUpdate withAgentUpgrade(AgentUpgrade agentUpgrade) { /** * Get the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @return the parentClusterResourceId value. */ public String parentClusterResourceId() { @@ -197,7 +203,7 @@ public String parentClusterResourceId() { /** * Set the parentClusterResourceId property: The resource id of the parent cluster (Azure HCI) this machine is * assigned to, if any. - * + * * @param parentClusterResourceId the parentClusterResourceId value to set. * @return the MachineUpdate object itself. */ @@ -212,7 +218,7 @@ public MachineUpdate withParentClusterResourceId(String parentClusterResourceId) /** * Get the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @return the privateLinkScopeResourceId value. */ public String privateLinkScopeResourceId() { @@ -222,7 +228,7 @@ public String privateLinkScopeResourceId() { /** * Set the privateLinkScopeResourceId property: The resource id of the private link scope this machine is assigned * to, if any. - * + * * @param privateLinkScopeResourceId the privateLinkScopeResourceId value to set. * @return the MachineUpdate object itself. */ @@ -236,7 +242,7 @@ public MachineUpdate withPrivateLinkScopeResourceId(String privateLinkScopeResou /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machines.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machines.java index f18538717e4a..7a6800e463e2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machines.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Machines.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Machines. */ +/** + * Resource collection API of Machines. + */ public interface Machines { /** * The operation to delete a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param context The context to associate with this operation. @@ -25,7 +27,7 @@ public interface Machines { /** * The operation to delete a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -36,7 +38,7 @@ public interface Machines { /** * Retrieves information about the model view or the instance view of a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param expand The expand expression to apply on the operation. @@ -46,12 +48,12 @@ public interface Machines { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return describes a hybrid machine along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String machineName, InstanceViewTypes expand, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String machineName, String expand, + Context context); /** * Retrieves information about the model view or the instance view of a hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,7 +65,7 @@ Response getByResourceGroupWithResponse( /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -75,7 +77,7 @@ Response getByResourceGroupWithResponse( /** * The operation to assess patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param context The context to associate with this operation. @@ -88,7 +90,7 @@ Response getByResourceGroupWithResponse( /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -97,12 +99,12 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result summary of an installation operation. */ - MachineInstallPatchesResult installPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput); + MachineInstallPatchesResult installPatches(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput); /** * The operation to install patches on a hybrid machine identity in Azure. - * + * * @param resourceGroupName The name of the resource group. * @param name The name of the hybrid machine. * @param installPatchesInput Input for InstallPatches as directly received by the API. @@ -112,13 +114,13 @@ MachineInstallPatchesResult installPatches( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the result summary of an installation operation. */ - MachineInstallPatchesResult installPatches( - String resourceGroupName, String name, MachineInstallPatchesParameters installPatchesInput, Context context); + MachineInstallPatchesResult installPatches(String resourceGroupName, String name, + MachineInstallPatchesParameters installPatchesInput, Context context); /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -130,7 +132,7 @@ MachineInstallPatchesResult installPatches( /** * Lists all the hybrid machines in the specified resource group. Use the nextLink property in the response to get * the next page of hybrid machines. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param expand Expands referenced resources. * @param context The context to associate with this operation. @@ -144,7 +146,7 @@ MachineInstallPatchesResult installPatches( /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the List hybrid machine operation response as paginated response with {@link PagedIterable}. @@ -154,7 +156,7 @@ MachineInstallPatchesResult installPatches( /** * Lists all the hybrid machines in the specified subscription. Use the nextLink property in the response to get the * next page of hybrid machines. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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 45ca31d40b88..67560539b302 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Describes a network interface. */ +/** + * Describes a network interface. + */ @Fluent public final class NetworkInterface { /* @@ -17,13 +19,15 @@ public final class NetworkInterface { @JsonProperty(value = "ipAddresses") private List ipAddresses; - /** Creates an instance of NetworkInterface class. */ + /** + * Creates an instance of NetworkInterface class. + */ public NetworkInterface() { } /** * Get the ipAddresses property: The list of IP addresses in this interface. - * + * * @return the ipAddresses value. */ public List ipAddresses() { @@ -32,7 +36,7 @@ public List ipAddresses() { /** * Set the ipAddresses property: The list of IP addresses in this interface. - * + * * @param ipAddresses the ipAddresses value to set. * @return the NetworkInterface object itself. */ @@ -43,7 +47,7 @@ public NetworkInterface withIpAddresses(List ipAddresses) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfile.java index d930f090cb4d..173807987ec3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfile.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfile.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner; import java.util.List; -/** An immutable client-side representation of NetworkProfile. */ +/** + * An immutable client-side representation of NetworkProfile. + */ public interface NetworkProfile { /** * Gets the networkInterfaces property: The list of network interfaces. - * + * * @return the networkInterfaces value. */ List networkInterfaces(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner object. - * + * * @return the inner object. */ NetworkProfileInner innerModel(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfiles.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfiles.java index 5528756cb930..8b286df841f7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfiles.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/NetworkProfiles.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of NetworkProfiles. */ +/** + * Resource collection API of NetworkProfiles. + */ public interface NetworkProfiles { /** * The operation to get network information of hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param context The context to associate with this operation. @@ -24,7 +26,7 @@ public interface NetworkProfiles { /** * The operation to get network information of hybrid machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfile.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfile.java index 13fc8f1552b9..6948e5d56644 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfile.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specifies the operating system settings for the hybrid machine. */ +/** + * Specifies the operating system settings for the hybrid machine. + */ @Fluent public final class OSProfile { /* @@ -28,13 +30,15 @@ public final class OSProfile { @JsonProperty(value = "linuxConfiguration") private OSProfileLinuxConfiguration linuxConfiguration; - /** Creates an instance of OSProfile class. */ + /** + * Creates an instance of OSProfile class. + */ public OSProfile() { } /** * Get the computerName property: Specifies the host OS name of the hybrid machine. - * + * * @return the computerName value. */ public String computerName() { @@ -43,7 +47,7 @@ public String computerName() { /** * Get the windowsConfiguration property: Specifies the windows configuration for update management. - * + * * @return the windowsConfiguration value. */ public OSProfileWindowsConfiguration windowsConfiguration() { @@ -52,7 +56,7 @@ public OSProfileWindowsConfiguration windowsConfiguration() { /** * Set the windowsConfiguration property: Specifies the windows configuration for update management. - * + * * @param windowsConfiguration the windowsConfiguration value to set. * @return the OSProfile object itself. */ @@ -63,7 +67,7 @@ public OSProfile withWindowsConfiguration(OSProfileWindowsConfiguration windowsC /** * Get the linuxConfiguration property: Specifies the linux configuration for update management. - * + * * @return the linuxConfiguration value. */ public OSProfileLinuxConfiguration linuxConfiguration() { @@ -72,7 +76,7 @@ public OSProfileLinuxConfiguration linuxConfiguration() { /** * Set the linuxConfiguration property: Specifies the linux configuration for update management. - * + * * @param linuxConfiguration the linuxConfiguration value to set. * @return the OSProfile object itself. */ @@ -83,7 +87,7 @@ public OSProfile withLinuxConfiguration(OSProfileLinuxConfiguration linuxConfigu /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileLinuxConfiguration.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileLinuxConfiguration.java index a0e71ea90fa3..1f8edb0b363c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileLinuxConfiguration.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileLinuxConfiguration.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.PatchSettings; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specifies the linux configuration for update management. */ +/** + * Specifies the linux configuration for update management. + */ @Fluent public final class OSProfileLinuxConfiguration { /* @@ -17,13 +19,15 @@ public final class OSProfileLinuxConfiguration { @JsonProperty(value = "patchSettings") private PatchSettings innerPatchSettings; - /** Creates an instance of OSProfileLinuxConfiguration class. */ + /** + * Creates an instance of OSProfileLinuxConfiguration class. + */ public OSProfileLinuxConfiguration() { } /** * Get the innerPatchSettings property: Specifies the patch settings. - * + * * @return the innerPatchSettings value. */ private PatchSettings innerPatchSettings() { @@ -32,7 +36,7 @@ private PatchSettings innerPatchSettings() { /** * Get the assessmentMode property: Specifies the assessment mode. - * + * * @return the assessmentMode value. */ public AssessmentModeTypes assessmentMode() { @@ -41,7 +45,7 @@ public AssessmentModeTypes assessmentMode() { /** * Set the assessmentMode property: Specifies the assessment mode. - * + * * @param assessmentMode the assessmentMode value to set. * @return the OSProfileLinuxConfiguration object itself. */ @@ -55,7 +59,7 @@ public OSProfileLinuxConfiguration withAssessmentMode(AssessmentModeTypes assess /** * Get the patchMode property: Specifies the patch mode. - * + * * @return the patchMode value. */ public PatchModeTypes patchMode() { @@ -64,7 +68,7 @@ public PatchModeTypes patchMode() { /** * Set the patchMode property: Specifies the patch mode. - * + * * @param patchMode the patchMode value to set. * @return the OSProfileLinuxConfiguration object itself. */ @@ -78,7 +82,7 @@ public OSProfileLinuxConfiguration withPatchMode(PatchModeTypes patchMode) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileWindowsConfiguration.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileWindowsConfiguration.java index 94a0146e8bb7..6904d9d1a813 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileWindowsConfiguration.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OSProfileWindowsConfiguration.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.PatchSettings; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specifies the windows configuration for update management. */ +/** + * Specifies the windows configuration for update management. + */ @Fluent public final class OSProfileWindowsConfiguration { /* @@ -17,13 +19,15 @@ public final class OSProfileWindowsConfiguration { @JsonProperty(value = "patchSettings") private PatchSettings innerPatchSettings; - /** Creates an instance of OSProfileWindowsConfiguration class. */ + /** + * Creates an instance of OSProfileWindowsConfiguration class. + */ public OSProfileWindowsConfiguration() { } /** * Get the innerPatchSettings property: Specifies the patch settings. - * + * * @return the innerPatchSettings value. */ private PatchSettings innerPatchSettings() { @@ -32,7 +36,7 @@ private PatchSettings innerPatchSettings() { /** * Get the assessmentMode property: Specifies the assessment mode. - * + * * @return the assessmentMode value. */ public AssessmentModeTypes assessmentMode() { @@ -41,7 +45,7 @@ public AssessmentModeTypes assessmentMode() { /** * Set the assessmentMode property: Specifies the assessment mode. - * + * * @param assessmentMode the assessmentMode value to set. * @return the OSProfileWindowsConfiguration object itself. */ @@ -55,7 +59,7 @@ public OSProfileWindowsConfiguration withAssessmentMode(AssessmentModeTypes asse /** * Get the patchMode property: Specifies the patch mode. - * + * * @return the patchMode value. */ public PatchModeTypes patchMode() { @@ -64,7 +68,7 @@ public PatchModeTypes patchMode() { /** * Set the patchMode property: Specifies the patch mode. - * + * * @param patchMode the patchMode value to set. * @return the OSProfileWindowsConfiguration object itself. */ @@ -78,7 +82,7 @@ public OSProfileWindowsConfiguration withPatchMode(PatchModeTypes patchMode) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationListResult.java index b3560ccb18b8..2e8c28ef4629 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The List Compute Operation operation response. */ +/** + * The List Compute Operation operation response. + */ @Immutable public final class OperationListResult { /* @@ -18,13 +20,15 @@ public final class OperationListResult { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: The list of compute operations. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValue.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValue.java index d9d9443f385b..41a944525663 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValue.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValue.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.OperationValueInner; -/** An immutable client-side representation of OperationValue. */ +/** + * An immutable client-side representation of OperationValue. + */ public interface OperationValue { /** * Gets the origin property: The origin of the compute operation. - * + * * @return the origin value. */ String origin(); /** * Gets the name property: The name of the compute operation. - * + * * @return the name value. */ String name(); /** * Gets the display property: Display properties. - * + * * @return the display value. */ OperationValueDisplay display(); /** * Gets the isDataAction property: This property indicates if the operation is an action or a data action. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.OperationValueInner object. - * + * * @return the inner object. */ OperationValueInner innerModel(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValueDisplay.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValueDisplay.java index 9b071e79c3d1..c7aa85da7555 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValueDisplay.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OperationValueDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the properties of a Hybrid Compute Operation Value Display. */ +/** + * Describes the properties of a Hybrid Compute Operation Value Display. + */ @Immutable public final class OperationValueDisplay { /* @@ -34,13 +36,15 @@ public final class OperationValueDisplay { @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; - /** Creates an instance of OperationValueDisplay class. */ + /** + * Creates an instance of OperationValueDisplay class. + */ public OperationValueDisplay() { } /** * Get the operation property: The display name of the compute operation. - * + * * @return the operation value. */ public String operation() { @@ -49,7 +53,7 @@ public String operation() { /** * Get the resource property: The display name of the resource the operation applies to. - * + * * @return the resource value. */ public String resource() { @@ -58,7 +62,7 @@ public String resource() { /** * Get the description property: The description of the operation. - * + * * @return the description value. */ public String description() { @@ -67,7 +71,7 @@ public String description() { /** * Get the provider property: The resource provider for the operation. - * + * * @return the provider value. */ public String provider() { @@ -76,7 +80,7 @@ public String provider() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Operations.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Operations.java index be231cbcd8bc..91af2424443d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Operations.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Operations.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Gets a list of hybrid compute operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of hybrid compute operations as paginated response with {@link PagedIterable}. @@ -20,7 +22,7 @@ public interface Operations { /** * Gets a list of hybrid compute operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OsType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OsType.java index c882c66f7d7b..c86eabba45f6 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OsType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/OsType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The operating system type of the machine. */ +/** + * The operating system type of the machine. + */ public final class OsType extends ExpandableStringEnum { - /** Static value Windows for OsType. */ + /** + * Static value Windows for OsType. + */ public static final OsType WINDOWS = fromString("Windows"); - /** Static value Linux for OsType. */ + /** + * Static value Linux for OsType. + */ public static final OsType LINUX = fromString("Linux"); /** * Creates a new instance of OsType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public OsType() { /** * Creates or finds a OsType from its string representation. - * + * * @param name a name to look for. * @return the corresponding OsType. */ @@ -38,7 +44,7 @@ public static OsType fromString(String name) { /** * Gets known OsType values. - * + * * @return known OsType values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchModeTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchModeTypes.java index 92b9381bf0bf..925f49abf310 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchModeTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchModeTypes.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Specifies the patch mode. */ +/** + * Specifies the patch mode. + */ public final class PatchModeTypes extends ExpandableStringEnum { - /** Static value ImageDefault for PatchModeTypes. */ + /** + * Static value ImageDefault for PatchModeTypes. + */ public static final PatchModeTypes IMAGE_DEFAULT = fromString("ImageDefault"); - /** Static value AutomaticByPlatform for PatchModeTypes. */ + /** + * Static value AutomaticByPlatform for PatchModeTypes. + */ public static final PatchModeTypes AUTOMATIC_BY_PLATFORM = fromString("AutomaticByPlatform"); - /** Static value AutomaticByOS for PatchModeTypes. */ + /** + * Static value AutomaticByOS for PatchModeTypes. + */ public static final PatchModeTypes AUTOMATIC_BY_OS = fromString("AutomaticByOS"); - /** Static value Manual for PatchModeTypes. */ + /** + * Static value Manual for PatchModeTypes. + */ public static final PatchModeTypes MANUAL = fromString("Manual"); /** * Creates a new instance of PatchModeTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public PatchModeTypes() { /** * Creates or finds a PatchModeTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding PatchModeTypes. */ @@ -44,7 +54,7 @@ public static PatchModeTypes fromString(String name) { /** * Gets known PatchModeTypes values. - * + * * @return known PatchModeTypes values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStartedBy.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStartedBy.java index 25911b9fe57c..332f5b385325 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStartedBy.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStartedBy.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Indicates if operation was triggered by user or by platform. */ +/** + * Indicates if operation was triggered by user or by platform. + */ public final class PatchOperationStartedBy extends ExpandableStringEnum { - /** Static value User for PatchOperationStartedBy. */ + /** + * Static value User for PatchOperationStartedBy. + */ public static final PatchOperationStartedBy USER = fromString("User"); - /** Static value Platform for PatchOperationStartedBy. */ + /** + * Static value Platform for PatchOperationStartedBy. + */ public static final PatchOperationStartedBy PLATFORM = fromString("Platform"); /** * Creates a new instance of PatchOperationStartedBy value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PatchOperationStartedBy() { /** * Creates or finds a PatchOperationStartedBy from its string representation. - * + * * @param name a name to look for. * @return the corresponding PatchOperationStartedBy. */ @@ -38,7 +44,7 @@ public static PatchOperationStartedBy fromString(String name) { /** * Gets known PatchOperationStartedBy values. - * + * * @return known PatchOperationStartedBy values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStatus.java index c8c37833b61d..eaa5a8f1afd8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchOperationStatus.java @@ -13,24 +13,34 @@ * that point it will become "Unknown", "Failed", "Succeeded", or "CompletedWithWarnings.". */ public final class PatchOperationStatus extends ExpandableStringEnum { - /** Static value Unknown for PatchOperationStatus. */ + /** + * Static value Unknown for PatchOperationStatus. + */ public static final PatchOperationStatus UNKNOWN = fromString("Unknown"); - /** Static value InProgress for PatchOperationStatus. */ + /** + * Static value InProgress for PatchOperationStatus. + */ public static final PatchOperationStatus IN_PROGRESS = fromString("InProgress"); - /** Static value Failed for PatchOperationStatus. */ + /** + * Static value Failed for PatchOperationStatus. + */ public static final PatchOperationStatus FAILED = fromString("Failed"); - /** Static value Succeeded for PatchOperationStatus. */ + /** + * Static value Succeeded for PatchOperationStatus. + */ public static final PatchOperationStatus SUCCEEDED = fromString("Succeeded"); - /** Static value CompletedWithWarnings for PatchOperationStatus. */ + /** + * Static value CompletedWithWarnings for PatchOperationStatus. + */ public static final PatchOperationStatus COMPLETED_WITH_WARNINGS = fromString("CompletedWithWarnings"); /** * Creates a new instance of PatchOperationStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +49,7 @@ public PatchOperationStatus() { /** * Creates or finds a PatchOperationStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding PatchOperationStatus. */ @@ -50,7 +60,7 @@ public static PatchOperationStatus fromString(String name) { /** * Gets known PatchOperationStatus values. - * + * * @return known PatchOperationStatus values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchServiceUsed.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchServiceUsed.java index 1f16c4548268..ef6821e2d8f3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchServiceUsed.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PatchServiceUsed.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Specifies the patch service used for the operation. */ +/** + * Specifies the patch service used for the operation. + */ public final class PatchServiceUsed extends ExpandableStringEnum { - /** Static value Unknown for PatchServiceUsed. */ + /** + * Static value Unknown for PatchServiceUsed. + */ public static final PatchServiceUsed UNKNOWN = fromString("Unknown"); - /** Static value WU for PatchServiceUsed. */ + /** + * Static value WU for PatchServiceUsed. + */ public static final PatchServiceUsed WU = fromString("WU"); - /** Static value WU_WSUS for PatchServiceUsed. */ + /** + * Static value WU_WSUS for PatchServiceUsed. + */ public static final PatchServiceUsed WU_WSUS = fromString("WU_WSUS"); - /** Static value YUM for PatchServiceUsed. */ + /** + * Static value YUM for PatchServiceUsed. + */ public static final PatchServiceUsed YUM = fromString("YUM"); - /** Static value APT for PatchServiceUsed. */ + /** + * Static value APT for PatchServiceUsed. + */ public static final PatchServiceUsed APT = fromString("APT"); - /** Static value Zypper for PatchServiceUsed. */ + /** + * Static value Zypper for PatchServiceUsed. + */ public static final PatchServiceUsed ZYPPER = fromString("Zypper"); /** * Creates a new instance of PatchServiceUsed value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public PatchServiceUsed() { /** * Creates or finds a PatchServiceUsed from its string representation. - * + * * @param name a name to look for. * @return the corresponding PatchServiceUsed. */ @@ -50,7 +64,7 @@ public static PatchServiceUsed fromString(String name) { /** * Gets known PatchServiceUsed values. - * + * * @return known PatchServiceUsed values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnection.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnection.java index e181dd611556..fa8e5c6e0121 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnection.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnection.java @@ -8,73 +8,83 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateEndpointConnectionInner; -/** An immutable client-side representation of PrivateEndpointConnection. */ +/** + * An immutable client-side representation of PrivateEndpointConnection. + */ public interface PrivateEndpointConnection { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: Resource properties. - * + * * @return the properties value. */ PrivateEndpointConnectionProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.PrivateEndpointConnectionInner object. - * + * * @return the inner object. */ PrivateEndpointConnectionInner innerModel(); - /** The entirety of the PrivateEndpointConnection definition. */ + /** + * The entirety of the PrivateEndpointConnection definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The PrivateEndpointConnection definition stages. */ + /** + * The PrivateEndpointConnection definition stages. + */ interface DefinitionStages { - /** The first stage of the PrivateEndpointConnection definition. */ + /** + * The first stage of the PrivateEndpointConnection definition. + */ interface Blank extends WithParentResource { } - /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */ + /** + * The stage of the PrivateEndpointConnection definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, scopeName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @return the next definition stage. @@ -89,25 +99,27 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ PrivateEndpointConnection create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ PrivateEndpointConnection create(Context context); } - /** The stage of the PrivateEndpointConnection definition allowing to specify properties. */ + /** + * The stage of the PrivateEndpointConnection definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Resource properties.. - * + * * @param properties Resource properties. * @return the next definition stage. */ @@ -117,36 +129,42 @@ interface WithProperties { /** * Begins update for the PrivateEndpointConnection resource. - * + * * @return the stage of resource update. */ PrivateEndpointConnection.Update update(); - /** The template for PrivateEndpointConnection update. */ + /** + * The template for PrivateEndpointConnection update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ PrivateEndpointConnection apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ PrivateEndpointConnection apply(Context context); } - /** The PrivateEndpointConnection update stages. */ + /** + * The PrivateEndpointConnection update stages. + */ interface UpdateStages { - /** The stage of the PrivateEndpointConnection update allowing to specify properties. */ + /** + * The stage of the PrivateEndpointConnection update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Resource properties.. - * + * * @param properties Resource properties. * @return the next definition stage. */ @@ -156,14 +174,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ PrivateEndpointConnection refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionDataModel.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionDataModel.java index 3c6a86dfefaf..13ba406579e7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionDataModel.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionDataModel.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Data Model for a Private Endpoint Connection associated with a Private Link Scope. */ +/** + * The Data Model for a Private Endpoint Connection associated with a Private Link Scope. + */ @Fluent public final class PrivateEndpointConnectionDataModel { /* @@ -34,13 +36,15 @@ public final class PrivateEndpointConnectionDataModel { @JsonProperty(value = "properties") private PrivateEndpointConnectionProperties properties; - /** Creates an instance of PrivateEndpointConnectionDataModel class. */ + /** + * Creates an instance of PrivateEndpointConnectionDataModel class. + */ public PrivateEndpointConnectionDataModel() { } /** * Get the id property: The ARM Resource Id of the Private Endpoint. - * + * * @return the id value. */ public String id() { @@ -49,7 +53,7 @@ public String id() { /** * Get the name property: The Name of the Private Endpoint. - * + * * @return the name value. */ public String name() { @@ -58,7 +62,7 @@ public String name() { /** * Get the type property: Azure resource type. - * + * * @return the type value. */ public String type() { @@ -67,7 +71,7 @@ public String type() { /** * Get the properties property: The Private Endpoint Connection properties. - * + * * @return the properties value. */ public PrivateEndpointConnectionProperties properties() { @@ -76,7 +80,7 @@ public PrivateEndpointConnectionProperties properties() { /** * Set the properties property: The Private Endpoint Connection properties. - * + * * @param properties the properties value to set. * @return the PrivateEndpointConnectionDataModel object itself. */ @@ -87,7 +91,7 @@ public PrivateEndpointConnectionDataModel withProperties(PrivateEndpointConnecti /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionListResult.java index 4419f1750da4..35ac23a6c775 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of private endpoint connections. */ +/** + * A list of private endpoint connections. + */ @Immutable public final class PrivateEndpointConnectionListResult { /* @@ -24,13 +26,15 @@ public final class PrivateEndpointConnectionListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of PrivateEndpointConnectionListResult class. */ + /** + * Creates an instance of PrivateEndpointConnectionListResult class. + */ public PrivateEndpointConnectionListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionProperties.java index b274d8abd367..9c53611d948b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnectionProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of a private endpoint connection. */ +/** + * Properties of a private endpoint connection. + */ @Fluent public final class PrivateEndpointConnectionProperties { /* @@ -35,13 +37,15 @@ public final class PrivateEndpointConnectionProperties { @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY) private List groupIds; - /** Creates an instance of PrivateEndpointConnectionProperties class. */ + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ public PrivateEndpointConnectionProperties() { } /** * Get the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @return the privateEndpoint value. */ public PrivateEndpointProperty privateEndpoint() { @@ -50,7 +54,7 @@ public PrivateEndpointProperty privateEndpoint() { /** * Set the privateEndpoint property: Private endpoint which the connection belongs to. - * + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionProperties object itself. */ @@ -61,7 +65,7 @@ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpointPr /** * Get the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState() { @@ -70,7 +74,7 @@ public PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionSta /** * Set the privateLinkServiceConnectionState property: Connection state of the private endpoint connection. - * + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionProperties object itself. */ @@ -82,7 +86,7 @@ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState /** * Get the provisioningState property: State of the private endpoint connection. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -91,7 +95,7 @@ public String provisioningState() { /** * Get the groupIds property: List of group IDs. - * + * * @return the groupIds value. */ public List groupIds() { @@ -100,7 +104,7 @@ public List groupIds() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnections.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnections.java index 9817927f1c7f..2c31215d788b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnections.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointConnections.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PrivateEndpointConnections. */ +/** + * Resource collection API of PrivateEndpointConnections. + */ public interface PrivateEndpointConnections { /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -22,12 +24,12 @@ public interface PrivateEndpointConnections { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String scopeName, String privateEndpointConnectionName, Context context); + Response getWithResponse(String resourceGroupName, String scopeName, + String privateEndpointConnectionName, Context context); /** * Gets a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -40,7 +42,7 @@ Response getWithResponse( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -52,7 +54,7 @@ Response getWithResponse( /** * Deletes a private endpoint connection with a given name. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param privateEndpointConnectionName The name of the private endpoint connection. @@ -65,35 +67,35 @@ Response getWithResponse( /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a private link scope as paginated response with {@link - * PagedIterable}. + * @return all private endpoint connections on a private link scope as paginated response with + * {@link PagedIterable}. */ PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName); /** * Gets all private endpoint connections on a private link scope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all private endpoint connections on a private link scope as paginated response with {@link - * PagedIterable}. + * @return all private endpoint connections on a private link scope as paginated response with + * {@link PagedIterable}. */ - PagedIterable listByPrivateLinkScope( - String resourceGroupName, String scopeName, Context context); + PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context); /** * Gets a private endpoint connection. - * + * * @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. @@ -104,7 +106,7 @@ PagedIterable listByPrivateLinkScope( /** * Gets a private endpoint connection. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -116,7 +118,7 @@ PagedIterable listByPrivateLinkScope( /** * Deletes a private endpoint connection with a given name. - * + * * @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. @@ -126,7 +128,7 @@ PagedIterable listByPrivateLinkScope( /** * Deletes a private endpoint connection with a given name. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,7 +139,7 @@ PagedIterable listByPrivateLinkScope( /** * Begins definition for a new PrivateEndpointConnection resource. - * + * * @param name resource name. * @return the first stage of the new PrivateEndpointConnection definition. */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointProperty.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointProperty.java index 185de32f28eb..9b63007b7428 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointProperty.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateEndpointProperty.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Private endpoint which the connection belongs to. */ +/** + * Private endpoint which the connection belongs to. + */ @Fluent public final class PrivateEndpointProperty { /* @@ -16,13 +18,15 @@ public final class PrivateEndpointProperty { @JsonProperty(value = "id") private String id; - /** Creates an instance of PrivateEndpointProperty class. */ + /** + * Creates an instance of PrivateEndpointProperty class. + */ public PrivateEndpointProperty() { } /** * Get the id property: Resource id of the private endpoint. - * + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Set the id property: Resource id of the private endpoint. - * + * * @param id the id value to set. * @return the PrivateEndpointProperty object itself. */ @@ -42,7 +46,7 @@ public PrivateEndpointProperty withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResource.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResource.java index 4cc8d1e89a25..553ebb24c27f 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResource.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResource.java @@ -7,46 +7,48 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkResourceInner; -/** An immutable client-side representation of PrivateLinkResource. */ +/** + * An immutable client-side representation of PrivateLinkResource. + */ public interface PrivateLinkResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: Resource properties. - * + * * @return the properties value. */ PrivateLinkResourceProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkResourceInner object. - * + * * @return the inner object. */ PrivateLinkResourceInner innerModel(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceListResult.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceListResult.java index f486303008ae..d62640cfe3aa 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceListResult.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of private link resources. */ +/** + * A list of private link resources. + */ @Immutable public final class PrivateLinkResourceListResult { /* @@ -24,13 +26,15 @@ public final class PrivateLinkResourceListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of PrivateLinkResourceListResult class. */ + /** + * Creates an instance of PrivateLinkResourceListResult class. + */ public PrivateLinkResourceListResult() { } /** * Get the value property: Array of results. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Get the nextLink property: Link to retrieve next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -48,7 +52,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceProperties.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceProperties.java index fc90aa123de7..74cfc1bd4d59 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceProperties.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResourceProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of a private link resource. */ +/** + * Properties of a private link resource. + */ @Immutable public final class PrivateLinkResourceProperties { /* @@ -29,13 +31,15 @@ public final class PrivateLinkResourceProperties { @JsonProperty(value = "requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) private List requiredZoneNames; - /** Creates an instance of PrivateLinkResourceProperties class. */ + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ public PrivateLinkResourceProperties() { } /** * Get the groupId property: The private link resource group id. - * + * * @return the groupId value. */ public String groupId() { @@ -44,7 +48,7 @@ public String groupId() { /** * Get the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ public List requiredMembers() { @@ -53,7 +57,7 @@ public List requiredMembers() { /** * Get the requiredZoneNames property: Required DNS zone names of the the private link resource. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -62,7 +66,7 @@ public List requiredZoneNames() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResources.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResources.java index a6a4040c945e..dec4aed06e6d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResources.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkResources.java @@ -8,24 +8,26 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PrivateLinkResources. */ +/** + * Resource collection API of PrivateLinkResources. + */ public interface PrivateLinkResources { /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -33,14 +35,14 @@ public interface PrivateLinkResources { * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope as paginated - * response with {@link PagedIterable}. + * response with {@link PagedIterable}. */ - PagedIterable listByPrivateLinkScope( - String resourceGroupName, String scopeName, Context context); + PagedIterable listByPrivateLinkScope(String resourceGroupName, String scopeName, + Context context); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param groupName The name of the private link resource. @@ -48,15 +50,15 @@ PagedIterable listByPrivateLinkScope( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with {@link - * Response}. + * @return the private link resources that need to be created for a Azure Monitor PrivateLinkScope along with + * {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String scopeName, String groupName, Context context); + Response getWithResponse(String resourceGroupName, String scopeName, String groupName, + Context context); /** * Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param groupName The name of the private link resource. diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopeValidationDetails.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopeValidationDetails.java index e40509ac866e..23a8a269b802 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopeValidationDetails.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopeValidationDetails.java @@ -7,11 +7,13 @@ import com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkScopeValidationDetailsInner; import java.util.List; -/** An immutable client-side representation of PrivateLinkScopeValidationDetails. */ +/** + * An immutable client-side representation of PrivateLinkScopeValidationDetails. + */ public interface PrivateLinkScopeValidationDetails { /** * Gets the id property: Azure resource Id. - * + * * @return the id value. */ String id(); @@ -19,14 +21,14 @@ public interface PrivateLinkScopeValidationDetails { /** * Gets the publicNetworkAccess property: Indicates whether machines associated with the private link scope can also * use public Azure Arc service endpoints. - * + * * @return the publicNetworkAccess value. */ PublicNetworkAccessType publicNetworkAccess(); /** * Gets the connectionDetails property: List of Private Endpoint Connection details. - * + * * @return the connectionDetails value. */ List connectionDetails(); @@ -34,7 +36,7 @@ public interface PrivateLinkScopeValidationDetails { /** * Gets the inner com.azure.resourcemanager.hybridcompute.fluent.models.PrivateLinkScopeValidationDetailsInner * object. - * + * * @return the inner object. */ PrivateLinkScopeValidationDetailsInner innerModel(); diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopes.java index 11e03d6bdf21..92e49b102d25 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopes.java @@ -8,58 +8,60 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PrivateLinkScopes. */ +/** + * Resource collection API of PrivateLinkScopes. + */ public interface PrivateLinkScopes { /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with {@link - * PagedIterable}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * Gets a list of all Azure Arc PrivateLinkScopes within a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with {@link - * PagedIterable}. + * @return a list of all Azure Arc PrivateLinkScopes within a subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); /** * Gets a list of Azure Arc PrivateLinkScopes within a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with {@link - * PagedIterable}. + * @return a list of Azure Arc PrivateLinkScopes within a resource group as paginated response with + * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -70,7 +72,7 @@ public interface PrivateLinkScopes { /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -82,7 +84,7 @@ public interface PrivateLinkScopes { /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -91,12 +93,12 @@ public interface PrivateLinkScopes { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Azure Arc PrivateLinkScope definition along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String scopeName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String scopeName, + Context context); /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scopeName The name of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -108,7 +110,7 @@ Response getByResourceGroupWithResponse( /** * Returns a Azure Arc PrivateLinkScope's validation details. - * + * * @param location The location of the target resource. * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. * @param context The context to associate with this operation. @@ -117,12 +119,12 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ - Response getValidationDetailsWithResponse( - String location, String privateLinkScopeId, Context context); + Response getValidationDetailsWithResponse(String location, + String privateLinkScopeId, Context context); /** * Returns a Azure Arc PrivateLinkScope's validation details. - * + * * @param location The location of the target resource. * @param privateLinkScopeId The id (Guid) of the Azure Arc PrivateLinkScope resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -134,7 +136,7 @@ Response getValidationDetailsWithResponse( /** * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the target machine to get the private link scope validation details for. * @param context The context to associate with this operation. @@ -143,12 +145,12 @@ Response getValidationDetailsWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response body along with {@link Response}. */ - Response getValidationDetailsForMachineWithResponse( - String resourceGroupName, String machineName, Context context); + Response getValidationDetailsForMachineWithResponse(String resourceGroupName, + String machineName, Context context); /** * Returns a Azure Arc PrivateLinkScope's validation details for a given machine. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the target machine to get the private link scope validation details for. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -160,7 +162,7 @@ Response getValidationDetailsForMachineWithRe /** * Returns a Azure Arc PrivateLinkScope. - * + * * @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. @@ -171,7 +173,7 @@ Response getValidationDetailsForMachineWithRe /** * Returns a Azure Arc PrivateLinkScope. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -183,7 +185,7 @@ Response getValidationDetailsForMachineWithRe /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @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. @@ -193,7 +195,7 @@ Response getValidationDetailsForMachineWithRe /** * Deletes a Azure Arc PrivateLinkScope. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -204,7 +206,7 @@ Response getValidationDetailsForMachineWithRe /** * Begins definition for a new HybridComputePrivateLinkScope resource. - * + * * @param name resource name. * @return the first stage of the new HybridComputePrivateLinkScope definition. */ diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopesResource.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopesResource.java index 0ff041dd66af..03a27165f964 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopesResource.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkScopesResource.java @@ -8,21 +8,29 @@ import com.azure.core.management.Resource; import java.util.Map; -/** An azure resource object. */ +/** + * An azure resource object. + */ @Fluent public class PrivateLinkScopesResource extends Resource { - /** Creates an instance of PrivateLinkScopesResource class. */ + /** + * Creates an instance of PrivateLinkScopesResource class. + */ public PrivateLinkScopesResource() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PrivateLinkScopesResource withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public PrivateLinkScopesResource withTags(Map tags) { super.withTags(tags); @@ -31,7 +39,7 @@ public PrivateLinkScopesResource withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkServiceConnectionStateProperty.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkServiceConnectionStateProperty.java index bcb2bdb1c278..c8866cdaf626 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkServiceConnectionStateProperty.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PrivateLinkServiceConnectionStateProperty.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** State of the private endpoint connection. */ +/** + * State of the private endpoint connection. + */ @Fluent public final class PrivateLinkServiceConnectionStateProperty { /* @@ -29,13 +31,15 @@ public final class PrivateLinkServiceConnectionStateProperty { @JsonProperty(value = "actionsRequired", access = JsonProperty.Access.WRITE_ONLY) private String actionsRequired; - /** Creates an instance of PrivateLinkServiceConnectionStateProperty class. */ + /** + * Creates an instance of PrivateLinkServiceConnectionStateProperty class. + */ public PrivateLinkServiceConnectionStateProperty() { } /** * Get the status property: The private link service connection status. - * + * * @return the status value. */ public String status() { @@ -44,7 +48,7 @@ public String status() { /** * Set the status property: The private link service connection status. - * + * * @param status the status value to set. * @return the PrivateLinkServiceConnectionStateProperty object itself. */ @@ -55,7 +59,7 @@ public PrivateLinkServiceConnectionStateProperty withStatus(String status) { /** * Get the description property: The private link service connection description. - * + * * @return the description value. */ public String description() { @@ -64,7 +68,7 @@ public String description() { /** * Set the description property: The private link service connection description. - * + * * @param description the description value to set. * @return the PrivateLinkServiceConnectionStateProperty object itself. */ @@ -75,7 +79,7 @@ public PrivateLinkServiceConnectionStateProperty withDescription(String descript /** * Get the actionsRequired property: The actions required for private link service connection. - * + * * @return the actionsRequired value. */ public String actionsRequired() { @@ -84,21 +88,19 @@ public String actionsRequired() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property status in model PrivateLinkServiceConnectionStateProperty")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property status in model PrivateLinkServiceConnectionStateProperty")); } if (description() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property description in model PrivateLinkServiceConnectionStateProperty")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property description in model PrivateLinkServiceConnectionStateProperty")); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeature.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeature.java new file mode 100644 index 000000000000..743465d68d93 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeature.java @@ -0,0 +1,126 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Product Feature. + */ +@Fluent +public final class ProductFeature { + /* + * Product feature name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Indicates the current status of the product features. + */ + @JsonProperty(value = "subscriptionStatus") + private LicenseProfileSubscriptionStatus subscriptionStatus; + + /* + * The timestamp in UTC when the billing starts. + */ + @JsonProperty(value = "billingStartDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime billingStartDate; + + /* + * The timestamp in UTC when the user enrolls the feature. + */ + @JsonProperty(value = "enrollmentDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime enrollmentDate; + + /* + * The timestamp in UTC when the user disenrolled the feature. + */ + @JsonProperty(value = "disenrollmentDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime disenrollmentDate; + + /** + * Creates an instance of ProductFeature class. + */ + public ProductFeature() { + } + + /** + * Get the name property: Product feature name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Product feature name. + * + * @param name the name value to set. + * @return the ProductFeature object itself. + */ + public ProductFeature withName(String name) { + this.name = name; + return this; + } + + /** + * Get the subscriptionStatus property: Indicates the current status of the product features. + * + * @return the subscriptionStatus value. + */ + public LicenseProfileSubscriptionStatus subscriptionStatus() { + return this.subscriptionStatus; + } + + /** + * Set the subscriptionStatus property: Indicates the current status of the product features. + * + * @param subscriptionStatus the subscriptionStatus value to set. + * @return the ProductFeature object itself. + */ + public ProductFeature withSubscriptionStatus(LicenseProfileSubscriptionStatus subscriptionStatus) { + this.subscriptionStatus = subscriptionStatus; + return this; + } + + /** + * Get the billingStartDate property: The timestamp in UTC when the billing starts. + * + * @return the billingStartDate value. + */ + public OffsetDateTime billingStartDate() { + return this.billingStartDate; + } + + /** + * Get the enrollmentDate property: The timestamp in UTC when the user enrolls the feature. + * + * @return the enrollmentDate value. + */ + public OffsetDateTime enrollmentDate() { + return this.enrollmentDate; + } + + /** + * Get the disenrollmentDate property: The timestamp in UTC when the user disenrolled the feature. + * + * @return the disenrollmentDate value. + */ + public OffsetDateTime disenrollmentDate() { + return this.disenrollmentDate; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeatureUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeatureUpdate.java new file mode 100644 index 000000000000..3aaffec88fae --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProductFeatureUpdate.java @@ -0,0 +1,80 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Product Feature. + */ +@Fluent +public final class ProductFeatureUpdate { + /* + * Product feature name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Indicates the new status of the product feature. + */ + @JsonProperty(value = "subscriptionStatus") + private LicenseProfileSubscriptionStatusUpdate subscriptionStatus; + + /** + * Creates an instance of ProductFeatureUpdate class. + */ + public ProductFeatureUpdate() { + } + + /** + * Get the name property: Product feature name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Product feature name. + * + * @param name the name value to set. + * @return the ProductFeatureUpdate object itself. + */ + public ProductFeatureUpdate withName(String name) { + this.name = name; + return this; + } + + /** + * Get the subscriptionStatus property: Indicates the new status of the product feature. + * + * @return the subscriptionStatus value. + */ + public LicenseProfileSubscriptionStatusUpdate subscriptionStatus() { + return this.subscriptionStatus; + } + + /** + * Set the subscriptionStatus property: Indicates the new status of the product feature. + * + * @param subscriptionStatus the subscriptionStatus value to set. + * @return the ProductFeatureUpdate object itself. + */ + public ProductFeatureUpdate withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate subscriptionStatus) { + this.subscriptionStatus = subscriptionStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueSeverity.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueSeverity.java new file mode 100644 index 000000000000..de2a6bafa479 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueSeverity.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Severity of the provisioning issue. + */ +public final class ProvisioningIssueSeverity extends ExpandableStringEnum { + /** + * Static value Warning for ProvisioningIssueSeverity. + */ + public static final ProvisioningIssueSeverity WARNING = fromString("Warning"); + + /** + * Static value Error for ProvisioningIssueSeverity. + */ + public static final ProvisioningIssueSeverity ERROR = fromString("Error"); + + /** + * Creates a new instance of ProvisioningIssueSeverity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningIssueSeverity() { + } + + /** + * Creates or finds a ProvisioningIssueSeverity from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningIssueSeverity. + */ + @JsonCreator + public static ProvisioningIssueSeverity fromString(String name) { + return fromString(name, ProvisioningIssueSeverity.class); + } + + /** + * Gets known ProvisioningIssueSeverity values. + * + * @return known ProvisioningIssueSeverity values. + */ + public static Collection values() { + return values(ProvisioningIssueSeverity.class); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueType.java new file mode 100644 index 000000000000..4edb6d5c5c69 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningIssueType.java @@ -0,0 +1,66 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of provisioning issue. + */ +public final class ProvisioningIssueType extends ExpandableStringEnum { + /** + * Static value MissingPerimeterConfiguration for ProvisioningIssueType. + */ + public static final ProvisioningIssueType MISSING_PERIMETER_CONFIGURATION + = fromString("MissingPerimeterConfiguration"); + + /** + * Static value MissingIdentityConfiguration for ProvisioningIssueType. + */ + public static final ProvisioningIssueType MISSING_IDENTITY_CONFIGURATION + = fromString("MissingIdentityConfiguration"); + + /** + * Static value ConfigurationPropagationFailure for ProvisioningIssueType. + */ + public static final ProvisioningIssueType CONFIGURATION_PROPAGATION_FAILURE + = fromString("ConfigurationPropagationFailure"); + + /** + * Static value Other for ProvisioningIssueType. + */ + public static final ProvisioningIssueType OTHER = fromString("Other"); + + /** + * Creates a new instance of ProvisioningIssueType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningIssueType() { + } + + /** + * Creates or finds a ProvisioningIssueType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningIssueType. + */ + @JsonCreator + public static ProvisioningIssueType fromString(String name) { + return fromString(name, ProvisioningIssueType.class); + } + + /** + * Gets known ProvisioningIssueType values. + * + * @return known ProvisioningIssueType values. + */ + public static Collection values() { + return values(ProvisioningIssueType.class); + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningState.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningState.java index 0c8d088b6780..b2b749e55c46 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningState.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ProvisioningState.java @@ -8,35 +8,53 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The provisioning state, which only appears in the response. */ +/** + * The provisioning state, which only appears in the response. + */ public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Creating for ProvisioningState. */ + /** + * Static value Creating for ProvisioningState. + */ public static final ProvisioningState CREATING = fromString("Creating"); - /** Static value Updating for ProvisioningState. */ + /** + * Static value Updating for ProvisioningState. + */ public static final ProvisioningState UPDATING = fromString("Updating"); - /** Static value Deleting for ProvisioningState. */ + /** + * Static value Deleting for ProvisioningState. + */ public static final ProvisioningState DELETING = fromString("Deleting"); - /** Static value Succeeded for ProvisioningState. */ + /** + * Static value Succeeded for ProvisioningState. + */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ProvisioningState. */ + /** + * Static value Failed for ProvisioningState. + */ public static final ProvisioningState FAILED = fromString("Failed"); - /** Static value Accepted for ProvisioningState. */ + /** + * Static value Accepted for ProvisioningState. + */ public static final ProvisioningState ACCEPTED = fromString("Accepted"); - /** Static value Canceled for ProvisioningState. */ + /** + * Static value Canceled for ProvisioningState. + */ public static final ProvisioningState CANCELED = fromString("Canceled"); - /** Static value Deleted for ProvisioningState. */ + /** + * Static value Deleted for ProvisioningState. + */ public static final ProvisioningState DELETED = fromString("Deleted"); /** * Creates a new instance of ProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +63,7 @@ public ProvisioningState() { /** * Creates or finds a ProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningState. */ @@ -56,7 +74,7 @@ public static ProvisioningState fromString(String name) { /** * Gets known ProvisioningState values. - * + * * @return known ProvisioningState values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PublicNetworkAccessType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PublicNetworkAccessType.java index f7bfb01853c5..615c8a28481a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PublicNetworkAccessType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/PublicNetworkAccessType.java @@ -13,15 +13,19 @@ * disabled (access to Azure Arc services only via private link). */ public final class PublicNetworkAccessType extends ExpandableStringEnum { - /** Static value Enabled for PublicNetworkAccessType. */ + /** + * Static value Enabled for PublicNetworkAccessType. + */ public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); - /** Static value Disabled for PublicNetworkAccessType. */ + /** + * Static value Disabled for PublicNetworkAccessType. + */ public static final PublicNetworkAccessType DISABLED = fromString("Disabled"); /** * Creates a new instance of PublicNetworkAccessType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +34,7 @@ public PublicNetworkAccessType() { /** * Creates or finds a PublicNetworkAccessType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PublicNetworkAccessType. */ @@ -41,7 +45,7 @@ public static PublicNetworkAccessType fromString(String name) { /** * Gets known PublicNetworkAccessType values. - * + * * @return known PublicNetworkAccessType values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceIdentityType.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceIdentityType.java index b3e8d8bcf620..8c5a0bb9f45d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceIdentityType.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceIdentityType.java @@ -7,12 +7,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** The identity type. */ +/** + * The identity type. + */ public enum ResourceIdentityType { - /** Enum value SystemAssigned. */ + /** + * Enum value SystemAssigned. + */ SYSTEM_ASSIGNED("SystemAssigned"); - /** The actual serialized value for a ResourceIdentityType instance. */ + /** + * The actual serialized value for a ResourceIdentityType instance. + */ private final String value; ResourceIdentityType(String value) { @@ -21,7 +27,7 @@ public enum ResourceIdentityType { /** * Parses a serialized value to a ResourceIdentityType instance. - * + * * @param value the serialized value to parse. * @return the parsed ResourceIdentityType object, or null if unable to parse. */ @@ -39,7 +45,9 @@ public static ResourceIdentityType fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceProviders.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceProviders.java index 03fb8081c738..7fa24bd9dcb3 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceProviders.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceProviders.java @@ -6,11 +6,13 @@ import com.azure.core.util.Context; -/** Resource collection API of ResourceProviders. */ +/** + * Resource collection API of ResourceProviders. + */ public interface ResourceProviders { /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -18,12 +20,12 @@ public interface ResourceProviders { * @throws com.azure.core.management.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 upgradeExtensions( - String resourceGroupName, String machineName, MachineExtensionUpgrade extensionUpgradeParameters); + void upgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters); /** * The operation to Upgrade Machine Extensions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the hybrid machine. * @param extensionUpgradeParameters Parameters supplied to the Upgrade Extensions operation. @@ -32,9 +34,6 @@ void upgradeExtensions( * @throws com.azure.core.management.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 upgradeExtensions( - String resourceGroupName, - String machineName, - MachineExtensionUpgrade extensionUpgradeParameters, - Context context); + void upgradeExtensions(String resourceGroupName, String machineName, + MachineExtensionUpgrade extensionUpgradeParameters, Context context); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceUpdate.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceUpdate.java index b73e119a620e..30d25c75beda 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceUpdate.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ResourceUpdate.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The Update Resource model definition. */ +/** + * The Update Resource model definition. + */ @Fluent public class ResourceUpdate { /* @@ -19,13 +21,15 @@ public class ResourceUpdate { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of ResourceUpdate class. */ + /** + * Creates an instance of ResourceUpdate class. + */ public ResourceUpdate() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the ResourceUpdate object itself. */ @@ -45,7 +49,7 @@ public ResourceUpdate withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 000000000000..68ecdad67c7a --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandInputParameter.java @@ -0,0 +1,91 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the properties of a run command parameter. + */ +@Fluent +public final class RunCommandInputParameter { + /* + * The run command parameter name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The run command parameter value. + */ + @JsonProperty(value = "value", required = true) + 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); +} 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 000000000000..4d612293f71e --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/RunCommandManagedIdentity.java @@ -0,0 +1,90 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * 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 { + /* + * Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. + */ + @JsonProperty(value = "objectId") + 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() { + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatus.java index 3542d05c0dd8..3a4345266e4d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the status and behavior of a service. */ +/** + * Describes the status and behavior of a service. + */ @Fluent public final class ServiceStatus { /* @@ -22,13 +24,15 @@ public final class ServiceStatus { @JsonProperty(value = "startupType") private String startupType; - /** Creates an instance of ServiceStatus class. */ + /** + * Creates an instance of ServiceStatus class. + */ public ServiceStatus() { } /** * Get the status property: The current status of the service. - * + * * @return the status value. */ public String status() { @@ -37,7 +41,7 @@ public String status() { /** * Set the status property: The current status of the service. - * + * * @param status the status value to set. * @return the ServiceStatus object itself. */ @@ -48,7 +52,7 @@ public ServiceStatus withStatus(String status) { /** * Get the startupType property: The behavior of the service when the Arc-enabled machine starts up. - * + * * @return the startupType value. */ public String startupType() { @@ -57,7 +61,7 @@ public String startupType() { /** * Set the startupType property: The behavior of the service when the Arc-enabled machine starts up. - * + * * @param startupType the startupType value to set. * @return the ServiceStatus object itself. */ @@ -68,7 +72,7 @@ public ServiceStatus withStartupType(String startupType) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatuses.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatuses.java index 5506fa84ce22..afdfbc282636 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatuses.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/ServiceStatuses.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Reports the state and behavior of dependent services. */ +/** + * Reports the state and behavior of dependent services. + */ @Fluent public final class ServiceStatuses { /* @@ -22,13 +24,15 @@ public final class ServiceStatuses { @JsonProperty(value = "guestConfigurationService") private ServiceStatus guestConfigurationService; - /** Creates an instance of ServiceStatuses class. */ + /** + * Creates an instance of ServiceStatuses class. + */ public ServiceStatuses() { } /** * Get the extensionService property: The state of the extension service on the Arc-enabled machine. - * + * * @return the extensionService value. */ public ServiceStatus extensionService() { @@ -37,7 +41,7 @@ public ServiceStatus extensionService() { /** * Set the extensionService property: The state of the extension service on the Arc-enabled machine. - * + * * @param extensionService the extensionService value to set. * @return the ServiceStatuses object itself. */ @@ -49,7 +53,7 @@ public ServiceStatuses withExtensionService(ServiceStatus extensionService) { /** * Get the guestConfigurationService property: The state of the guest configuration service on the Arc-enabled * machine. - * + * * @return the guestConfigurationService value. */ public ServiceStatus guestConfigurationService() { @@ -59,7 +63,7 @@ public ServiceStatus guestConfigurationService() { /** * Set the guestConfigurationService property: The state of the guest configuration service on the Arc-enabled * machine. - * + * * @param guestConfigurationService the guestConfigurationService value to set. * @return the ServiceStatuses object itself. */ @@ -70,7 +74,7 @@ public ServiceStatuses withGuestConfigurationService(ServiceStatus guestConfigur /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusLevelTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusLevelTypes.java index 3f12c89e83c3..500e35b6b5a7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusLevelTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusLevelTypes.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The level code. */ +/** + * The level code. + */ public final class StatusLevelTypes extends ExpandableStringEnum { - /** Static value Info for StatusLevelTypes. */ + /** + * Static value Info for StatusLevelTypes. + */ public static final StatusLevelTypes INFO = fromString("Info"); - /** Static value Warning for StatusLevelTypes. */ + /** + * Static value Warning for StatusLevelTypes. + */ public static final StatusLevelTypes WARNING = fromString("Warning"); - /** Static value Error for StatusLevelTypes. */ + /** + * Static value Error for StatusLevelTypes. + */ public static final StatusLevelTypes ERROR = fromString("Error"); /** * Creates a new instance of StatusLevelTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public StatusLevelTypes() { /** * Creates or finds a StatusLevelTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding StatusLevelTypes. */ @@ -41,7 +49,7 @@ public static StatusLevelTypes fromString(String name) { /** * Gets known StatusLevelTypes values. - * + * * @return known StatusLevelTypes values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusTypes.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusTypes.java index 5fcabdee480d..0be1d06fd8bc 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusTypes.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/StatusTypes.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The status of the hybrid machine agent. */ +/** + * The status of the hybrid machine agent. + */ public final class StatusTypes extends ExpandableStringEnum { - /** Static value Connected for StatusTypes. */ + /** + * Static value Connected for StatusTypes. + */ public static final StatusTypes CONNECTED = fromString("Connected"); - /** Static value Disconnected for StatusTypes. */ + /** + * Static value Disconnected for StatusTypes. + */ public static final StatusTypes DISCONNECTED = fromString("Disconnected"); - /** Static value Error for StatusTypes. */ + /** + * Static value Error for StatusTypes. + */ public static final StatusTypes ERROR = fromString("Error"); /** * Creates a new instance of StatusTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public StatusTypes() { /** * Creates or finds a StatusTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding StatusTypes. */ @@ -41,7 +49,7 @@ public static StatusTypes fromString(String name) { /** * Gets known StatusTypes values. - * + * * @return known StatusTypes values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Subnet.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Subnet.java index 2e0e66905280..b9d4e9106fe8 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Subnet.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/Subnet.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the subnet. */ +/** + * Describes the subnet. + */ @Fluent public final class Subnet { /* @@ -16,13 +18,15 @@ public final class Subnet { @JsonProperty(value = "addressPrefix") private String addressPrefix; - /** Creates an instance of Subnet class. */ + /** + * Creates an instance of Subnet class. + */ public Subnet() { } /** * Get the addressPrefix property: Represents address prefix. - * + * * @return the addressPrefix value. */ public String addressPrefix() { @@ -31,7 +35,7 @@ public String addressPrefix() { /** * Set the addressPrefix property: Represents address prefix. - * + * * @param addressPrefix the addressPrefix value to set. * @return the Subnet object itself. */ @@ -42,7 +46,7 @@ public Subnet withAddressPrefix(String addressPrefix) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/TagsResource.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/TagsResource.java index e74821d927e1..5b6658eb6830 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/TagsResource.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/TagsResource.java @@ -22,13 +22,15 @@ public final class TagsResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of TagsResource class. */ + /** + * Creates an instance of TagsResource class. + */ public TagsResource() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -37,7 +39,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the TagsResource object itself. */ @@ -48,7 +50,7 @@ public TagsResource withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationLinux.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationLinux.java index 9cc2af6eafbf..f71582e7ac84 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationLinux.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationLinux.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VMGuestPatchClassificationLinux. */ +/** + * Defines values for VMGuestPatchClassificationLinux. + */ public final class VMGuestPatchClassificationLinux extends ExpandableStringEnum { - /** Static value Critical for VMGuestPatchClassificationLinux. */ + /** + * Static value Critical for VMGuestPatchClassificationLinux. + */ public static final VMGuestPatchClassificationLinux CRITICAL = fromString("Critical"); - /** Static value Security for VMGuestPatchClassificationLinux. */ + /** + * Static value Security for VMGuestPatchClassificationLinux. + */ public static final VMGuestPatchClassificationLinux SECURITY = fromString("Security"); - /** Static value Other for VMGuestPatchClassificationLinux. */ + /** + * Static value Other for VMGuestPatchClassificationLinux. + */ public static final VMGuestPatchClassificationLinux OTHER = fromString("Other"); /** * Creates a new instance of VMGuestPatchClassificationLinux value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public VMGuestPatchClassificationLinux() { /** * Creates or finds a VMGuestPatchClassificationLinux from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMGuestPatchClassificationLinux. */ @@ -41,7 +49,7 @@ public static VMGuestPatchClassificationLinux fromString(String name) { /** * Gets known VMGuestPatchClassificationLinux values. - * + * * @return known VMGuestPatchClassificationLinux values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationWindows.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationWindows.java index b3048d00a037..442ae5388498 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationWindows.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchClassificationWindows.java @@ -8,35 +8,53 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VMGuestPatchClassificationWindows. */ +/** + * Defines values for VMGuestPatchClassificationWindows. + */ public final class VMGuestPatchClassificationWindows extends ExpandableStringEnum { - /** Static value Critical for VMGuestPatchClassificationWindows. */ + /** + * Static value Critical for VMGuestPatchClassificationWindows. + */ public static final VMGuestPatchClassificationWindows CRITICAL = fromString("Critical"); - /** Static value Security for VMGuestPatchClassificationWindows. */ + /** + * Static value Security for VMGuestPatchClassificationWindows. + */ public static final VMGuestPatchClassificationWindows SECURITY = fromString("Security"); - /** Static value UpdateRollUp for VMGuestPatchClassificationWindows. */ + /** + * Static value UpdateRollUp for VMGuestPatchClassificationWindows. + */ public static final VMGuestPatchClassificationWindows UPDATE_ROLL_UP = fromString("UpdateRollUp"); - /** Static value FeaturePack for VMGuestPatchClassificationWindows. */ + /** + * Static value FeaturePack for VMGuestPatchClassificationWindows. + */ public static final VMGuestPatchClassificationWindows FEATURE_PACK = fromString("FeaturePack"); - /** Static value ServicePack for VMGuestPatchClassificationWindows. */ + /** + * Static value ServicePack for VMGuestPatchClassificationWindows. + */ public static final VMGuestPatchClassificationWindows SERVICE_PACK = fromString("ServicePack"); - /** Static value Definition for VMGuestPatchClassificationWindows. */ + /** + * Static value Definition for VMGuestPatchClassificationWindows. + */ public static final VMGuestPatchClassificationWindows DEFINITION = fromString("Definition"); - /** Static value Tools for VMGuestPatchClassificationWindows. */ + /** + * Static value Tools for VMGuestPatchClassificationWindows. + */ public static final VMGuestPatchClassificationWindows TOOLS = fromString("Tools"); - /** Static value Updates for VMGuestPatchClassificationWindows. */ + /** + * Static value Updates for VMGuestPatchClassificationWindows. + */ public static final VMGuestPatchClassificationWindows UPDATES = fromString("Updates"); /** * Creates a new instance of VMGuestPatchClassificationWindows value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -45,7 +63,7 @@ public VMGuestPatchClassificationWindows() { /** * Creates or finds a VMGuestPatchClassificationWindows from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMGuestPatchClassificationWindows. */ @@ -56,7 +74,7 @@ public static VMGuestPatchClassificationWindows fromString(String name) { /** * Gets known VMGuestPatchClassificationWindows values. - * + * * @return known VMGuestPatchClassificationWindows values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootSetting.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootSetting.java index e4e9a50a1cab..564120350448 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootSetting.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootSetting.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines when it is acceptable to reboot a VM during a software update operation. */ +/** + * Defines when it is acceptable to reboot a VM during a software update operation. + */ public final class VMGuestPatchRebootSetting extends ExpandableStringEnum { - /** Static value IfRequired for VMGuestPatchRebootSetting. */ + /** + * Static value IfRequired for VMGuestPatchRebootSetting. + */ public static final VMGuestPatchRebootSetting IF_REQUIRED = fromString("IfRequired"); - /** Static value Never for VMGuestPatchRebootSetting. */ + /** + * Static value Never for VMGuestPatchRebootSetting. + */ public static final VMGuestPatchRebootSetting NEVER = fromString("Never"); - /** Static value Always for VMGuestPatchRebootSetting. */ + /** + * Static value Always for VMGuestPatchRebootSetting. + */ public static final VMGuestPatchRebootSetting ALWAYS = fromString("Always"); /** * Creates a new instance of VMGuestPatchRebootSetting value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public VMGuestPatchRebootSetting() { /** * Creates or finds a VMGuestPatchRebootSetting from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMGuestPatchRebootSetting. */ @@ -41,7 +49,7 @@ public static VMGuestPatchRebootSetting fromString(String name) { /** * Gets known VMGuestPatchRebootSetting values. - * + * * @return known VMGuestPatchRebootSetting values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootStatus.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootStatus.java index 4908e8a44c1d..3edbca36e328 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootStatus.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/VMGuestPatchRebootStatus.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The reboot state of the VM following completion of the operation. */ +/** + * The reboot state of the VM following completion of the operation. + */ public final class VMGuestPatchRebootStatus extends ExpandableStringEnum { - /** Static value Unknown for VMGuestPatchRebootStatus. */ + /** + * Static value Unknown for VMGuestPatchRebootStatus. + */ public static final VMGuestPatchRebootStatus UNKNOWN = fromString("Unknown"); - /** Static value NotNeeded for VMGuestPatchRebootStatus. */ + /** + * Static value NotNeeded for VMGuestPatchRebootStatus. + */ public static final VMGuestPatchRebootStatus NOT_NEEDED = fromString("NotNeeded"); - /** Static value Required for VMGuestPatchRebootStatus. */ + /** + * Static value Required for VMGuestPatchRebootStatus. + */ public static final VMGuestPatchRebootStatus REQUIRED = fromString("Required"); - /** Static value Started for VMGuestPatchRebootStatus. */ + /** + * Static value Started for VMGuestPatchRebootStatus. + */ public static final VMGuestPatchRebootStatus STARTED = fromString("Started"); - /** Static value Failed for VMGuestPatchRebootStatus. */ + /** + * Static value Failed for VMGuestPatchRebootStatus. + */ public static final VMGuestPatchRebootStatus FAILED = fromString("Failed"); - /** Static value Completed for VMGuestPatchRebootStatus. */ + /** + * Static value Completed for VMGuestPatchRebootStatus. + */ public static final VMGuestPatchRebootStatus COMPLETED = fromString("Completed"); /** * Creates a new instance of VMGuestPatchRebootStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public VMGuestPatchRebootStatus() { /** * Creates or finds a VMGuestPatchRebootStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding VMGuestPatchRebootStatus. */ @@ -50,7 +64,7 @@ public static VMGuestPatchRebootStatus fromString(String name) { /** * Gets known VMGuestPatchRebootStatus values. - * + * * @return known VMGuestPatchRebootStatus values. */ public static Collection values() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/WindowsParameters.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/WindowsParameters.java index 8554787db6ee..4f58bbf72f1b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/WindowsParameters.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/WindowsParameters.java @@ -9,7 +9,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Input for InstallPatches on a Windows VM, as directly received by the API. */ +/** + * Input for InstallPatches on a Windows VM, as directly received by the API. + */ @Fluent public final class WindowsParameters { /* @@ -42,14 +44,16 @@ public final class WindowsParameters { @JsonProperty(value = "maxPatchPublishDate") private OffsetDateTime maxPatchPublishDate; - /** Creates an instance of WindowsParameters class. */ + /** + * Creates an instance of WindowsParameters class. + */ public WindowsParameters() { } /** * Get the classificationsToInclude property: The update classifications to select when installing patches for * Windows. - * + * * @return the classificationsToInclude value. */ public List classificationsToInclude() { @@ -59,19 +63,19 @@ public List classificationsToInclude() { /** * Set the classificationsToInclude property: The update classifications to select when installing patches for * Windows. - * + * * @param classificationsToInclude the classificationsToInclude value to set. * @return the WindowsParameters object itself. */ - public WindowsParameters withClassificationsToInclude( - List classificationsToInclude) { + public WindowsParameters + withClassificationsToInclude(List classificationsToInclude) { this.classificationsToInclude = classificationsToInclude; return this; } /** * Get the kbNumbersToInclude property: Kbs to include in the patch operation. - * + * * @return the kbNumbersToInclude value. */ public List kbNumbersToInclude() { @@ -80,7 +84,7 @@ public List kbNumbersToInclude() { /** * Set the kbNumbersToInclude property: Kbs to include in the patch operation. - * + * * @param kbNumbersToInclude the kbNumbersToInclude value to set. * @return the WindowsParameters object itself. */ @@ -91,7 +95,7 @@ public WindowsParameters withKbNumbersToInclude(List kbNumbersToInclude) /** * Get the kbNumbersToExclude property: Kbs to exclude in the patch operation. - * + * * @return the kbNumbersToExclude value. */ public List kbNumbersToExclude() { @@ -100,7 +104,7 @@ public List kbNumbersToExclude() { /** * Set the kbNumbersToExclude property: Kbs to exclude in the patch operation. - * + * * @param kbNumbersToExclude the kbNumbersToExclude value to set. * @return the WindowsParameters object itself. */ @@ -112,7 +116,7 @@ public WindowsParameters withKbNumbersToExclude(List kbNumbersToExclude) /** * Get the excludeKbsRequiringReboot property: Filters out Kbs that don't have an InstallationRebootBehavior of * 'NeverReboots' when this is set to true. - * + * * @return the excludeKbsRequiringReboot value. */ public Boolean excludeKbsRequiringReboot() { @@ -122,7 +126,7 @@ public Boolean excludeKbsRequiringReboot() { /** * Set the excludeKbsRequiringReboot property: Filters out Kbs that don't have an InstallationRebootBehavior of * 'NeverReboots' when this is set to true. - * + * * @param excludeKbsRequiringReboot the excludeKbsRequiringReboot value to set. * @return the WindowsParameters object itself. */ @@ -134,7 +138,7 @@ public WindowsParameters withExcludeKbsRequiringReboot(Boolean excludeKbsRequiri /** * Get the maxPatchPublishDate property: This is used to install patches that were published on or before this given * max published date. - * + * * @return the maxPatchPublishDate value. */ public OffsetDateTime maxPatchPublishDate() { @@ -144,7 +148,7 @@ public OffsetDateTime maxPatchPublishDate() { /** * Set the maxPatchPublishDate property: This is used to install patches that were published on or before this given * max published date. - * + * * @param maxPatchPublishDate the maxPatchPublishDate value to set. * @return the WindowsParameters object itself. */ @@ -155,7 +159,7 @@ public WindowsParameters withMaxPatchPublishDate(OffsetDateTime maxPatchPublishD /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/package-info.java index f357d6d5dad9..5b17a54d2a4b 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for HybridComputeManagementClient. The Hybrid Compute Management Client. */ +/** + * Package containing the data models for HybridComputeManagementClient. + * The Hybrid Compute Management Client. + */ package com.azure.resourcemanager.hybridcompute.models; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/package-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/package-info.java index cf9356d1989e..1e451aba2d13 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/package-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for HybridComputeManagementClient. The Hybrid Compute Management Client. */ +/** + * Package containing the classes for HybridComputeManagementClient. + * The Hybrid Compute Management Client. + */ package com.azure.resourcemanager.hybridcompute; diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/module-info.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/module-info.java index 74ba0990cead..b7c70c5ec0f4 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/module-info.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.hybridcompute { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.hybridcompute; exports com.azure.resourcemanager.hybridcompute.fluent; exports com.azure.resourcemanager.hybridcompute.fluent.models; exports com.azure.resourcemanager.hybridcompute.models; - - opens com.azure.resourcemanager.hybridcompute.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.hybridcompute.models to - com.azure.core, - com.fasterxml.jackson.databind; -} + opens com.azure.resourcemanager.hybridcompute.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.hybridcompute.models to com.azure.core, com.fasterxml.jackson.databind; +} \ No newline at end of file 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 a990ce4fe8f9..e1d6dd82267a 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.LicensesClientImpl$LicensesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.MachinesClientImpl$MachinesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.LicenseProfilesClientImpl$LicenseProfilesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.MachineExtensionsClientImpl$MachineExtensionsService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.ResourceProvidersClientImpl$ResourceProvidersService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.ExtensionMetadatasClientImpl$ExtensionMetadatasService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.NetworkProfilesClientImpl$NetworkProfilesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.HybridIdentityMetadatasClientImpl$HybridIdentityMetadatasService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.AgentVersionsClientImpl$AgentVersionsService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkScopesClientImpl$PrivateLinkScopesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.hybridcompute.implementation.MachinesClientImpl$MachinesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.MachineExtensionsClientImpl$MachineExtensionsService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.ResourceProvidersClientImpl$ResourceProvidersService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.ExtensionMetadatasClientImpl$ExtensionMetadatasService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.NetworkProfilesClientImpl$NetworkProfilesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.MachineRunCommandsClientImpl$MachineRunCommandsService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkScopesClientImpl$PrivateLinkScopesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService" ], [ "com.azure.resourcemanager.hybridcompute.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService" ] ] \ No newline at end of file diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hybridcompute/reflect-config.json b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hybridcompute/reflect-config.json index 02c8db0932ff..0a7776771e6e 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hybridcompute/reflect-config.json +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hybridcompute/reflect-config.json @@ -1,44 +1,4 @@ [ { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseDetails", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseUpdateProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseUpdatePropertiesLicenseDetails", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.hybridcompute.models.ResourceUpdate", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicensesListResult", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.MachineInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, @@ -104,107 +64,102 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewEsuPropertiesInner", + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileMachineInstanceView", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileArmEsuPropertiesWithoutAssignedLicense", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileMachineInstanceViewSoftwareAssurance", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileStorageModelEsuProperties", + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileMachineInstanceViewEsuProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.EsuKey", + "name" : "com.azure.resourcemanager.hybridcompute.models.License", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceView", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceViewStatus", + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseDetails", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner", + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileArmEsuPropertiesWithoutAssignedLicense", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.NetworkInterface", + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileStorageModelEsuProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.IpAddress", + "name" : "com.azure.resourcemanager.hybridcompute.models.EsuKey", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.Subnet", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileArmProductProfileProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner", + "name" : "com.azure.resourcemanager.hybridcompute.models.ProductFeature", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.MachineExtensionProperties", + "name" : "com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceView", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.Identity", + "name" : "com.azure.resourcemanager.hybridcompute.models.MachineExtensionInstanceViewStatus", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileInner", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.NetworkProfileInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileProperties", + "name" : "com.azure.resourcemanager.hybridcompute.models.NetworkInterface", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileArmEsuProperties", + "name" : "com.azure.resourcemanager.hybridcompute.models.IpAddress", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileUpdate", + "name" : "com.azure.resourcemanager.hybridcompute.models.Subnet", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileUpdateProperties", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.EsuProfileUpdateProperties", + "name" : "com.azure.resourcemanager.hybridcompute.models.MachineExtensionProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfilesListResult", + "name" : "com.azure.resourcemanager.hybridcompute.models.Identity", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -253,6 +208,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.ResourceUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.hybridcompute.models.MachineExtensionsListResult", "allDeclaredConstructors" : true, @@ -299,27 +259,42 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.HybridIdentityMetadataInner", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.MachineRunCommandProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.MachineRunCommandScriptSource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.RunCommandManagedIdentity", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.HybridIdentityMetadataProperties", + "name" : "com.azure.resourcemanager.hybridcompute.models.RunCommandInputParameter", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.HybridIdentityMetadataList", + "name" : "com.azure.resourcemanager.hybridcompute.models.MachineRunCommandInstanceView", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionsListInner", + "name" : "com.azure.resourcemanager.hybridcompute.models.ExtensionsResourceStatus", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionInner", + "name" : "com.azure.resourcemanager.hybridcompute.models.MachineRunCommandsListResult", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -414,37 +389,67 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.ProvisioningState", + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseUpdate", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseType", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseUpdateProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseState", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseUpdatePropertiesLicenseDetails", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseTarget", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileArmEsuProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseEdition", + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileUpdate", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseCoreType", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileUpdatePropertiesSoftwareAssurance", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.EsuProfileUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.ProductProfileUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.MachineRunCommandUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.AccessRule", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes", + "name" : "com.azure.resourcemanager.hybridcompute.fluent.models.AccessRuleProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -468,6 +473,41 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseTarget", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseEdition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseCoreType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseAssignmentState", "allDeclaredConstructors" : true, @@ -488,6 +528,16 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.hybridcompute.models.StatusTypes", "allDeclaredConstructors" : true, @@ -543,11 +593,41 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.ExecutionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.ProvisioningIssueType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.ProvisioningIssueSeverity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.AccessRuleDirection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hybridcompute.models.ExtensionsStatusLevelTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.hybridcompute.models.ResourceIdentityType", "allDeclaredConstructors" : true, diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionGetSamples.java deleted file mode 100644 index aa82e8f48783..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionGetSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for AgentVersion Get. */ -public final class AgentVersionGetSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/AgentVersion_GetLatest.json - */ - /** - * Sample code: GET Agent Versions. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void gETAgentVersions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.agentVersions().getWithResponse("myOsType", "1.27", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionListSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionListSamples.java deleted file mode 100644 index 84f69af2de75..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for AgentVersion List. */ -public final class AgentVersionListSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/AgentVersions_Get.json - */ - /** - * Sample code: GET Agent Versions. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void gETAgentVersions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.agentVersions().listWithResponse("myOsType", com.azure.core.util.Context.NONE); - } -} 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 f1c71be27b63..c6513d378d83 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 @@ -4,24 +4,21 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for ExtensionMetadata Get. */ +/** + * Samples for ExtensionMetadata Get. + */ public final class ExtensionMetadataGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/ExtensionMetadata_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/ExtensionMetadata_Get.json */ /** * Sample code: GET an extensions metadata. - * + * * @param manager Entry point to HybridComputeManager. */ public static void gETAnExtensionsMetadata(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .extensionMetadatas() - .getWithResponse( - "EastUS", - "microsoft.azure.monitor", - "azuremonitorlinuxagent", - "1.9.1", + manager.extensionMetadatas() + .getWithResponse("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", "1.9.1", com.azure.core.util.Context.NONE); } } 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 17e0898dd975..a6b0e206b4bf 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for ExtensionMetadata List. */ +/** + * Samples for ExtensionMetadata List. + */ public final class ExtensionMetadataListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/ExtensionMetadata_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/ExtensionMetadata_List.json */ /** * Sample code: GET a list of extensions. - * + * * @param manager Entry point to HybridComputeManager. */ public static void gETAListOfExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .extensionMetadatas() + manager.extensionMetadatas() .list("EastUS", "microsoft.azure.monitor", "azuremonitorlinuxagent", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/HybridIdentityMetadataGetSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/HybridIdentityMetadataGetSamples.java deleted file mode 100644 index 42835f6dd7cf..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/HybridIdentityMetadataGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for HybridIdentityMetadata Get. */ -public final class HybridIdentityMetadataGetSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/HybridIdentityMetadata_Get.json - */ - /** - * Sample code: GetHybridIdentityMetadata. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void getHybridIdentityMetadata(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .hybridIdentityMetadatas() - .getWithResponse("testrg", "ContosoVm", "default", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/HybridIdentityMetadataListByMachinesSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/HybridIdentityMetadataListByMachinesSamples.java deleted file mode 100644 index 741edeaae014..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/HybridIdentityMetadataListByMachinesSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for HybridIdentityMetadata ListByMachines. */ -public final class HybridIdentityMetadataListByMachinesSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/HybridIdentityMetadata_ListByVirtualMachines.json - */ - /** - * Sample code: HybridIdentityMetadataListByVirtualMachines. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void hybridIdentityMetadataListByVirtualMachines( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.hybridIdentityMetadatas().listByMachines("testrg", "ContosoVm", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 8c81251f17c2..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesCreateOrUpdateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for LicenseProfiles CreateOrUpdate. */ -public final class LicenseProfilesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update a License Profile. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void createOrUpdateALicenseProfile( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .licenseProfiles() - .define() - .withRegion("eastus2euap") - .withExistingMachine("myResourceGroup", "myMachine") - .withAssignedLicense("{LicenseResourceId}") - .create(); - } -} 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 deleted file mode 100644 index be86d5594547..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesDeleteSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for LicenseProfiles Delete. */ -public final class LicenseProfilesDeleteSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_Delete.json - */ - /** - * Sample code: Delete a License Profile. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void deleteALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenseProfiles().delete("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index adb24f04c642..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesGetSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for LicenseProfiles Get. */ -public final class LicenseProfilesGetSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_Get.json - */ - /** - * Sample code: Get License Profile. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void getLicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenseProfiles().getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 2a95c14c1254..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for LicenseProfiles List. */ -public final class LicenseProfilesListSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_List.json - */ - /** - * Sample code: List all License Profiles. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void listAllLicenseProfiles(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenseProfiles().list("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 9f888ed71b81..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfilesUpdateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.resourcemanager.hybridcompute.models.LicenseProfile; - -/** Samples for LicenseProfiles Update. */ -public final class LicenseProfilesUpdateSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/licenseProfile/LicenseProfile_Update.json - */ - /** - * Sample code: Update a License Profile. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void updateALicenseProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - LicenseProfile resource = - manager - .licenseProfiles() - .getWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withAssignedLicense("{LicenseResourceId}").apply(); - } -} 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 deleted file mode 100644 index 21a241f08618..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; - -/** Samples for Licenses CreateOrUpdate. */ -public final class LicensesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_CreateOrUpdate.json - */ - /** - * Sample code: Create or Update a License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void createOrUpdateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .licenses() - .define("{licenseName}") - .withRegion("eastus2euap") - .withExistingResourceGroup("myResourceGroup") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails( - new LicenseDetails() - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(6)) - .create(); - } -} 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 deleted file mode 100644 index a5f1e1be6d41..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for Licenses Delete. */ -public final class LicensesDeleteSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_Delete.json - */ - /** - * Sample code: Delete a License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void deleteALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses().delete("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 06319f86f651..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for Licenses GetByResourceGroup. */ -public final class LicensesGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_Get.json - */ - /** - * Sample code: Get License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void getLicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .licenses() - .getByResourceGroupWithResponse("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index b99eb3a48130..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for Licenses ListByResourceGroup. */ -public final class LicensesListByResourceGroupSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_ListByResourceGroup.json - */ - /** - * Sample code: GET all Machine Extensions. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void gETAllMachineExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 6bd02d8066ba..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -/** Samples for Licenses List. */ -public final class LicensesListSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_ListBySubscription.json - */ - /** - * Sample code: List Licenses by Subscription. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void listLicensesBySubscription( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager.licenses().list(com.azure.core.util.Context.NONE); - } -} 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 deleted file mode 100644 index 4057b16459ac..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesUpdateSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; - -/** Samples for Licenses Update. */ -public final class LicensesUpdateSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_Update.json - */ - /** - * Sample code: Update a License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void updateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - License resource = - manager - .licenses() - .getByResourceGroupWithResponse("myResourceGroup", "{licenseName}", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withLicenseType(LicenseType.ESU) - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(6) - .apply(); - } -} 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 deleted file mode 100644 index 5d5d38660774..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; - -/** Samples for Licenses ValidateLicense. */ -public final class LicensesValidateLicenseSamples { - /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/license/License_ValidateLicense.json - */ - /** - * Sample code: Validate a License. - * - * @param manager Entry point to HybridComputeManager. - */ - public static void validateALicense(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .licenses() - .validateLicense( - new LicenseInner() - .withLocation("eastus2euap") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails( - new LicenseDetails() - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(6)), - com.azure.core.util.Context.NONE); - } -} 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 ecc27b1ef67c..fa127912a71c 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 @@ -8,32 +8,30 @@ import java.util.HashMap; import java.util.Map; -/** Samples for MachineExtensions CreateOrUpdate. */ +/** + * Samples for MachineExtensions CreateOrUpdate. + */ public final class MachineExtensionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_CreateOrUpdate.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_CreateOrUpdate.json */ /** * Sample code: Create or Update a Machine Extension. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void createOrUpdateAMachineExtension( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machineExtensions() + public static void + createOrUpdateAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machineExtensions() .define("CustomScriptExtension") .withRegion("eastus2euap") .withExistingMachine("myResourceGroup", "myMachine") .withProperties( - new MachineExtensionProperties() - .withPublisher("Microsoft.Compute") + new MachineExtensionProperties().withPublisher("Microsoft.Compute") .withType("CustomScriptExtension") .withTypeHandlerVersion("1.10") - .withSettings( - mapOf( - "commandToExecute", - "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\""))) + .withSettings(mapOf("commandToExecute", + "powershell.exe -c \"Get-Process | Where-Object { $_.CPU -gt 10000 }\""))) .create(); } 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 0fef1458ae90..ff89a9a68725 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for MachineExtensions Delete. */ +/** + * Samples for MachineExtensions Delete. + */ public final class MachineExtensionsDeleteSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_Delete.json */ /** * Sample code: Delete a Machine Extension. - * + * * @param manager Entry point to HybridComputeManager. */ public static void deleteAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { 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 f85608d97c41..80783a9fa5b3 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for MachineExtensions Get. */ +/** + * Samples for MachineExtensions Get. + */ public final class MachineExtensionsGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_Get.json */ /** * Sample code: GET Machine Extension. - * + * * @param manager Entry point to HybridComputeManager. */ public static void gETMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machineExtensions() + manager.machineExtensions() .getWithResponse("myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE); } } 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 ca164f180d57..61cbe9ba9339 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 @@ -4,18 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for MachineExtensions List. */ +/** + * Samples for MachineExtensions List. + */ public final class MachineExtensionsListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_List.json */ /** * Sample code: GET all Machine Extensions - List. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void gETAllMachineExtensionsList( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + gETAllMachineExtensionsList(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.machineExtensions().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/MachineExtensionsUpdateSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionsUpdateSamples.java index fbabf341b5ab..b5cd8ee9db91 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 @@ -8,26 +8,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for MachineExtensions Update. */ +/** + * Samples for MachineExtensions Update. + */ public final class MachineExtensionsUpdateSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extension_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extension_Update.json */ /** * Sample code: Create or Update a Machine Extension. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void createOrUpdateAMachineExtension( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - MachineExtension resource = - manager - .machineExtensions() - .getWithResponse( - "myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + createOrUpdateAMachineExtension(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + MachineExtension resource = manager.machineExtensions() + .getWithResponse("myResourceGroup", "myMachine", "CustomScriptExtension", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withPublisher("Microsoft.Compute") .withType("CustomScriptExtension") .withTypeHandlerVersion("1.10") 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 000000000000..28a11bca17e5 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsCreateOrUpdateSamples.java @@ -0,0 +1,40 @@ +// 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/2023-10-03-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 000000000000..45b122a1ccb8 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsDeleteSamples.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; + +/** + * Samples for MachineRunCommands Delete. + */ +public final class MachineRunCommandsDeleteSamples { + /* + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-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 000000000000..36a5e645eba4 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsGetSamples.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; + +/** + * Samples for MachineRunCommands Get. + */ +public final class MachineRunCommandsGetSamples { + /* + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-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 000000000000..03bc7d692323 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsListSamples.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; + +/** + * Samples for MachineRunCommands List. + */ +public final class MachineRunCommandsListSamples { + /* + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-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 03b7d7d4e6fa..f4c92d3a571c 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 @@ -4,18 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for Machines AssessPatches. */ +/** + * Samples for Machines AssessPatches. + */ public final class MachinesAssessPatchesSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machine_AssessPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machine_AssessPatches.json */ /** * Sample code: Assess patch state of a machine. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void assessPatchStateOfAMachine( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + assessPatchStateOfAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.machines().assessPatches("myResourceGroupName", "myMachineName", com.azure.core.util.Context.NONE); } } 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 dde772dcc097..d193ab448e9c 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for Machines Delete. */ +/** + * Samples for Machines Delete. + */ public final class MachinesDeleteSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Delete.json */ /** * Sample code: Delete a Machine. - * + * * @param manager Entry point to HybridComputeManager. */ public static void deleteAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machines() + manager.machines() .deleteByResourceGroupWithResponse("myResourceGroup", "myMachine", com.azure.core.util.Context.NONE); } } 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 4820da4b63cd..64ae6aace7d4 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 @@ -4,37 +4,35 @@ package com.azure.resourcemanager.hybridcompute.generated; -import com.azure.resourcemanager.hybridcompute.models.InstanceViewTypes; - -/** Samples for Machines GetByResourceGroup. */ +/** + * Samples for Machines GetByResourceGroup. + */ public final class MachinesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Get_LicenseProfileInstanceView.json */ /** * Sample code: Get Machine with License Profile Instance View. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void getMachineWithLicenseProfileInstanceView( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machines() - .getByResourceGroupWithResponse( - "myResourceGroup", "myMachine", InstanceViewTypes.INSTANCE_VIEW, com.azure.core.util.Context.NONE); + public static void + getMachineWithLicenseProfileInstanceView(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines() + .getByResourceGroupWithResponse("myResourceGroup", "myMachine", "instanceView", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_Get.json */ /** * Sample code: Get Machine. - * + * * @param manager Entry point to HybridComputeManager. */ public static void getMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machines() + manager.machines() .getByResourceGroupWithResponse("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/MachinesInstallPatchesSamples.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/samples/java/com/azure/resourcemanager/hybridcompute/generated/MachinesInstallPatchesSamples.java index 2702b7d4b3a1..8e661f73954f 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 @@ -8,37 +8,32 @@ import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationWindows; import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchRebootSetting; import com.azure.resourcemanager.hybridcompute.models.WindowsParameters; +import java.time.Duration; import java.time.OffsetDateTime; import java.util.Arrays; -/** Samples for Machines InstallPatches. */ +/** + * Samples for Machines InstallPatches. + */ public final class MachinesInstallPatchesSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machine_InstallPatches.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machine_InstallPatches.json */ /** * Sample code: Install patch state of a machine. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void installPatchStateOfAMachine( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .machines() - .installPatches( - "myResourceGroupName", - "myMachineName", - new MachineInstallPatchesParameters() - .withMaximumDuration("PT4H") + public static void + installPatchStateOfAMachine(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.machines() + .installPatches("myResourceGroupName", "myMachineName", + new MachineInstallPatchesParameters().withMaximumDuration(Duration.parse("PT4H")) .withRebootSetting(VMGuestPatchRebootSetting.IF_REQUIRED) - .withWindowsParameters( - new WindowsParameters() - .withClassificationsToInclude( - Arrays - .asList( - VMGuestPatchClassificationWindows.CRITICAL, - VMGuestPatchClassificationWindows.SECURITY)) - .withMaxPatchPublishDate(OffsetDateTime.parse("2021-08-19T02:36:43.0539904+00:00"))), + .withWindowsParameters(new WindowsParameters() + .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.CRITICAL, + VMGuestPatchClassificationWindows.SECURITY)) + .withMaxPatchPublishDate(OffsetDateTime.parse("2021-08-19T02:36:43.0539904+00:00"))), com.azure.core.util.Context.NONE); } } 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 cdcd8b5def8a..39710648ed2d 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 @@ -4,18 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for Machines ListByResourceGroup. */ +/** + * Samples for Machines ListByResourceGroup. + */ public final class MachinesListByResourceGroupSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_ListByResourceGroup.json */ /** * Sample code: List Machines by resource group. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void listMachinesByResourceGroup( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + listMachinesByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.machines().listByResourceGroup("myResourceGroup", null, com.azure.core.util.Context.NONE); } } 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 600e35bb32da..53549d063193 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 @@ -4,18 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for Machines List. */ +/** + * Samples for Machines List. + */ public final class MachinesListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/machine/Machines_ListBySubscription.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/machine/Machines_ListBySubscription.json */ /** * Sample code: List Machines by resource group. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void listMachinesByResourceGroup( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + listMachinesByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.machines().list(com.azure.core.util.Context.NONE); } } 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 b4ec3dcf32c8..8fc703a054c6 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for NetworkProfile Get. */ +/** + * Samples for NetworkProfile Get. + */ public final class NetworkProfileGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/NetworkProfile_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/NetworkProfile_Get.json */ /** * Sample code: GET Network Profile. - * + * * @param manager Entry point to HybridComputeManager. */ public static void gETNetworkProfile(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { 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 784fde490d7a..a8f55cfd16e6 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 @@ -4,18 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/Operations_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/Operations_List.json */ /** * Sample code: List Hybrid Compute Provider Operations. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void listHybridComputeProviderOperations( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + listHybridComputeProviderOperations(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } 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 ad37cab7e6b9..438331bc6d05 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 @@ -7,28 +7,26 @@ import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties; import com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnectionStateProperty; -/** Samples for PrivateEndpointConnections CreateOrUpdate. */ +/** + * Samples for PrivateEndpointConnections CreateOrUpdate. + */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_Update.json */ /** * Sample code: Approve or reject a private endpoint connection with a given name. - * + * * @param manager Entry point to HybridComputeManager. */ public static void approveOrRejectAPrivateEndpointConnectionWithAGivenName( com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateEndpointConnections() + manager.privateEndpointConnections() .define("private-endpoint-connection-name") .withExistingPrivateLinkScope("myResourceGroup", "myPrivateLinkScope") - .withProperties( - new PrivateEndpointConnectionProperties() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("Approved") - .withDescription("Approved by johndoe@contoso.com"))) + .withProperties(new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionStateProperty().withStatus("Approved") + .withDescription("Approved by johndoe@contoso.com"))) .create(); } } 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 efa9bf97d31f..f5bfc3ecc91c 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 @@ -4,24 +4,22 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateEndpointConnections Delete. */ +/** + * Samples for PrivateEndpointConnections Delete. + */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_Delete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. - * + * * @param manager Entry point to HybridComputeManager. */ public static void deletesAPrivateEndpointConnectionWithAGivenName( com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateEndpointConnections() - .delete( - "myResourceGroup", - "myPrivateLinkScope", - "private-endpoint-connection-name", + manager.privateEndpointConnections() + .delete("myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); } } 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 44754af6c101..76997c436d94 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 @@ -4,24 +4,22 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateEndpointConnections Get. */ +/** + * Samples for PrivateEndpointConnections Get. + */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_Get.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void getsPrivateEndpointConnection( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateEndpointConnections() - .getWithResponse( - "myResourceGroup", - "myPrivateLinkScope", - "private-endpoint-connection-name", + public static void + getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateEndpointConnections() + .getWithResponse("myResourceGroup", "myPrivateLinkScope", "private-endpoint-connection-name", com.azure.core.util.Context.NONE); } } 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 a6b56ae53718..141734bee1bf 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateEndpointConnections ListByPrivateLinkScope. */ +/** + * Samples for PrivateEndpointConnections ListByPrivateLinkScope. + */ public final class PrivateEndpointConnectionsListByPrivateLinkScopeSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateEndpoint/PrivateEndpointConnection_List.json */ /** * Sample code: Gets list of private endpoint connections on a private link scope. - * + * * @param manager Entry point to HybridComputeManager. */ public static void getsListOfPrivateEndpointConnectionsOnAPrivateLinkScope( com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateEndpointConnections() + manager.privateEndpointConnections() .listByPrivateLinkScope("myResourceGroup", "myPrivateLinkScope", com.azure.core.util.Context.NONE); } } 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 23e4a0caa10e..f5540e5a120b 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 @@ -4,21 +4,22 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateLinkResources Get. */ +/** + * Samples for PrivateLinkResources Get. + */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_Get.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void getsPrivateEndpointConnection( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkResources() - .getWithResponse( - "myResourceGroup", "myPrivateLinkScope", "hybridcompute", com.azure.core.util.Context.NONE); + public static void + getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkResources() + .getWithResponse("myResourceGroup", "myPrivateLinkScope", "hybridcompute", + com.azure.core.util.Context.NONE); } } 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 7f0bf92646ba..e331106b8849 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateLinkResources ListByPrivateLinkScope. */ +/** + * Samples for PrivateLinkResources ListByPrivateLinkScope. + */ public final class PrivateLinkResourcesListByPrivateLinkScopeSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopePrivateLinkResource_ListGet.json */ /** * Sample code: Gets private endpoint connection. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void getsPrivateEndpointConnection( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkResources() + public static void + getsPrivateEndpointConnection(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + manager.privateLinkResources() .listByPrivateLinkScope("myResourceGroup", "myPrivateLinkScope", com.azure.core.util.Context.NONE); } } 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 bb884182600b..2aa85a59d0c1 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 @@ -7,19 +7,20 @@ import java.util.HashMap; import java.util.Map; -/** Samples for PrivateLinkScopes CreateOrUpdate. */ +/** + * Samples for PrivateLinkScopes CreateOrUpdate. + */ public final class PrivateLinkScopesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Create.json */ /** * Sample code: PrivateLinkScopeCreate. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeCreate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() + manager.privateLinkScopes() .define("my-privatelinkscope") .withRegion("westus") .withExistingResourceGroup("my-resource-group") @@ -27,16 +28,15 @@ public static void privateLinkScopeCreate(com.azure.resourcemanager.hybridcomput } /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Update.json */ /** * Sample code: PrivateLinkScopeUpdate. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeUpdate(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() + manager.privateLinkScopes() .define("my-privatelinkscope") .withRegion("westus") .withExistingResourceGroup("my-resource-group") 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 593b8c523ec4..98756d770f75 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 @@ -4,19 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateLinkScopes Delete. */ +/** + * Samples for PrivateLinkScopes Delete. + */ public final class PrivateLinkScopesDeleteSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Delete.json */ /** * Sample code: PrivateLinkScopesDelete. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopesDelete(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() + manager.privateLinkScopes() .delete("my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE); } } 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 a57af8b12e50..4052e4ac9f86 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateLinkScopes GetByResourceGroup. */ +/** + * Samples for PrivateLinkScopes GetByResourceGroup. + */ public final class PrivateLinkScopesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_Get.json */ /** * Sample code: PrivateLinkScopeGet. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() - .getByResourceGroupWithResponse( - "my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE); + manager.privateLinkScopes() + .getByResourceGroupWithResponse("my-resource-group", "my-privatelinkscope", + com.azure.core.util.Context.NONE); } } 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 68514a5b4371..67d3a87a664e 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateLinkScopes GetValidationDetailsForMachine. */ +/** + * Samples for PrivateLinkScopes GetValidationDetailsForMachine. + */ public final class PrivateLinkScopesGetValidationDetailsForMachineSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidationForMachine.json */ /** * Sample code: PrivateLinkScopeGet. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() - .getValidationDetailsForMachineWithResponse( - "my-resource-group", "machineName", com.azure.core.util.Context.NONE); + manager.privateLinkScopes() + .getValidationDetailsForMachineWithResponse("my-resource-group", "machineName", + com.azure.core.util.Context.NONE); } } 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 77b47a84c541..d0296199b194 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 @@ -4,20 +4,21 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateLinkScopes GetValidationDetails. */ +/** + * Samples for PrivateLinkScopes GetValidationDetails. + */ public final class PrivateLinkScopesGetValidationDetailsSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_GetValidation.json */ /** * Sample code: PrivateLinkScopeGet. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopeGet(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .privateLinkScopes() - .getValidationDetailsWithResponse( - "wus2", "f5dc51d3-92ed-4d7e-947a-775ea79b4919", com.azure.core.util.Context.NONE); + manager.privateLinkScopes() + .getValidationDetailsWithResponse("wus2", "f5dc51d3-92ed-4d7e-947a-775ea79b4919", + com.azure.core.util.Context.NONE); } } 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 4ccc7615d74a..e2bd3ac3013d 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 @@ -4,18 +4,20 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateLinkScopes ListByResourceGroup. */ +/** + * Samples for PrivateLinkScopes ListByResourceGroup. + */ public final class PrivateLinkScopesListByResourceGroupSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_ListByResourceGroup.json */ /** * Sample code: PrivateLinkScopeListByResourceGroup. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void privateLinkScopeListByResourceGroup( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + public static void + privateLinkScopeListByResourceGroup(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { manager.privateLinkScopes().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } 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 25e52762b4c7..027624b27d20 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 @@ -4,14 +4,16 @@ package com.azure.resourcemanager.hybridcompute.generated; -/** Samples for PrivateLinkScopes List. */ +/** + * Samples for PrivateLinkScopes List. + */ public final class PrivateLinkScopesListSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_List.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_List.json */ /** * Sample code: PrivateLinkScopesList.json. - * + * * @param manager Entry point to HybridComputeManager. */ public static void privateLinkScopesListJson(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { 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 02f5ec5451f9..aea58f166415 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 @@ -8,24 +8,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for PrivateLinkScopes UpdateTags. */ +/** + * Samples for PrivateLinkScopes UpdateTags. + */ public final class PrivateLinkScopesUpdateTagsSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/privateLinkScope/PrivateLinkScopes_UpdateTagsOnly.json */ /** * Sample code: PrivateLinkScopeUpdateTagsOnly. - * + * * @param manager Entry point to HybridComputeManager. */ - public static void privateLinkScopeUpdateTagsOnly( - com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - HybridComputePrivateLinkScope resource = - manager - .privateLinkScopes() - .getByResourceGroupWithResponse( - "my-resource-group", "my-privatelinkscope", com.azure.core.util.Context.NONE) - .getValue(); + public static void + privateLinkScopeUpdateTagsOnly(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { + HybridComputePrivateLinkScope resource = manager.privateLinkScopes() + .getByResourceGroupWithResponse("my-resource-group", "my-privatelinkscope", + com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("Tag1", "Value1", "Tag2", "Value2")).apply(); } 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 7b848e59caad..f52f5797088f 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 @@ -9,29 +9,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ResourceProvider UpgradeExtensions. */ +/** + * Samples for ResourceProvider UpgradeExtensions. + */ public final class ResourceProviderUpgradeExtensionsSamples { /* - * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-06-20-preview/examples/extension/Extensions_Upgrade.json + * x-ms-original-file: specification/hybridcompute/resource-manager/Microsoft.HybridCompute/preview/2023-10-03-preview/examples/extension/Extensions_Upgrade.json */ /** * Sample code: Upgrade Machine Extensions. - * + * * @param manager Entry point to HybridComputeManager. */ public static void upgradeMachineExtensions(com.azure.resourcemanager.hybridcompute.HybridComputeManager manager) { - manager - .resourceProviders() - .upgradeExtensions( - "myResourceGroup", - "myMachine", - new MachineExtensionUpgrade() - .withExtensionTargets( - mapOf( - "Microsoft.Azure.Monitoring", - new ExtensionTargetProperties().withTargetVersion("2.0"), - "Microsoft.Compute.CustomScriptExtension", - new ExtensionTargetProperties().withTargetVersion("1.10"))), + manager.resourceProviders() + .upgradeExtensions("myResourceGroup", "myMachine", + new MachineExtensionUpgrade().withExtensionTargets(mapOf("Microsoft.Azure.Monitoring", + new ExtensionTargetProperties().withTargetVersion("2.0"), "Microsoft.Compute.CustomScriptExtension", + new ExtensionTargetProperties().withTargetVersion("1.10"))), 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 new file mode 100644 index 000000000000..3962f37394a8 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRulePropertiesTests.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.fluent.models.AccessRuleProperties; + +public final class AccessRulePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessRuleProperties model = BinaryData + .fromString("{\"direction\":\"Inbound\",\"addressPrefixes\":[\"khbejdznxc\",\"dsrhnjiv\",\"lvtno\"]}") + .toObject(AccessRuleProperties.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessRuleProperties model = new AccessRuleProperties(); + model = BinaryData.fromObject(model).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 new file mode 100644 index 000000000000..160bfdf96a6e --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AccessRuleTests.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.AccessRule; + +public final class AccessRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessRule model = BinaryData.fromString( + "{\"name\":\"rtwnawjslbi\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"yztsfmz\",\"baeqphc\",\"qnrnrpxehuwryk\",\"gaifmvik\"]}}") + .toObject(AccessRule.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AccessRule model = new AccessRule(); + model = BinaryData.fromObject(model).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 d97f07f367ff..3cee370af02e 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 @@ -10,11 +10,9 @@ public final class AgentConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AgentConfiguration model = - BinaryData - .fromString( - "{\"proxyUrl\":\"ocpcy\",\"incomingConnectionsPorts\":[\"rzafbljjgpbtoqcj\",\"klj\"],\"extensionsAllowList\":[{\"publisher\":\"idtqajzyu\",\"type\":\"kudjkrlkhb\"},{\"publisher\":\"fepgzgq\",\"type\":\"zloc\"}],\"extensionsBlockList\":[{\"publisher\":\"aierhhb\",\"type\":\"glu\"}],\"proxyBypass\":[\"jtjaodxobnbdxkq\"],\"extensionsEnabled\":\"okaj\",\"guestConfigurationEnabled\":\"npime\",\"configMode\":\"full\"}") - .toObject(AgentConfiguration.class); + AgentConfiguration model = BinaryData.fromString( + "{\"proxyUrl\":\"tyxolniwpwc\",\"incomingConnectionsPorts\":[\"fkgiawxk\",\"ryplwckbasyypn\",\"dhsgcba\"],\"extensionsAllowList\":[{\"publisher\":\"jkot\",\"type\":\"qgoulznd\"},{\"publisher\":\"kwy\",\"type\":\"gfgibm\"},{\"publisher\":\"gakeqsr\",\"type\":\"bzqqedqytbciq\"}],\"extensionsBlockList\":[{\"publisher\":\"lmmnkzsmodmglo\",\"type\":\"pbkwtmu\"},{\"publisher\":\"uqktap\",\"type\":\"wgcu\"}],\"proxyBypass\":[\"umkdosvqwhbmd\",\"bbjfddgmbmbexp\",\"bhtqqrolfpfpsa\",\"gbquxigj\"],\"extensionsEnabled\":\"gzjaoyfhrtxilne\",\"guestConfigurationEnabled\":\"ujysvle\",\"configMode\":\"monitor\"}") + .toObject(AgentConfiguration.class); } @org.junit.jupiter.api.Test 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 5191d3a6a356..44e5c090db99 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 @@ -6,31 +6,28 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.hybridcompute.models.AgentUpgrade; +import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class AgentUpgradeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AgentUpgrade model = - BinaryData - .fromString( - "{\"desiredVersion\":\"qeojnxqbzvddntw\",\"correlationId\":\"eic\",\"enableAutomaticUpgrade\":false,\"lastAttemptDesiredVersion\":\"pzaoqvuhr\",\"lastAttemptTimestamp\":\"f\",\"lastAttemptStatus\":\"Success\",\"lastAttemptMessage\":\"dglmjthjqkwp\"}") - .toObject(AgentUpgrade.class); - Assertions.assertEquals("qeojnxqbzvddntw", model.desiredVersion()); - Assertions.assertEquals("eic", model.correlationId()); + AgentUpgrade model = BinaryData.fromString( + "{\"desiredVersion\":\"dkfthwxmnt\",\"correlationId\":\"a1fa0ce1-66ed-48a3-9ddb-c8274f5fb48c\",\"enableAutomaticUpgrade\":false,\"lastAttemptDesiredVersion\":\"pvkmijcmmxdcuf\",\"lastAttemptTimestamp\":\"2021-05-13T13:25:47Z\",\"lastAttemptStatus\":\"Failed\",\"lastAttemptMessage\":\"mzidnsezcxtb\"}") + .toObject(AgentUpgrade.class); + Assertions.assertEquals("dkfthwxmnt", model.desiredVersion()); + Assertions.assertEquals(UUID.fromString("a1fa0ce1-66ed-48a3-9ddb-c8274f5fb48c"), model.correlationId()); Assertions.assertEquals(false, model.enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AgentUpgrade model = - new AgentUpgrade() - .withDesiredVersion("qeojnxqbzvddntw") - .withCorrelationId("eic") - .withEnableAutomaticUpgrade(false); + AgentUpgrade model = new AgentUpgrade().withDesiredVersion("dkfthwxmnt") + .withCorrelationId(UUID.fromString("a1fa0ce1-66ed-48a3-9ddb-c8274f5fb48c")) + .withEnableAutomaticUpgrade(false); model = BinaryData.fromObject(model).toObject(AgentUpgrade.class); - Assertions.assertEquals("qeojnxqbzvddntw", model.desiredVersion()); - Assertions.assertEquals("eic", model.correlationId()); + Assertions.assertEquals("dkfthwxmnt", model.desiredVersion()); + Assertions.assertEquals(UUID.fromString("a1fa0ce1-66ed-48a3-9ddb-c8274f5fb48c"), model.correlationId()); Assertions.assertEquals(false, model.enableAutomaticUpgrade()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionInnerTests.java deleted file mode 100644 index ffdd97e9fdfd..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionInner; -import org.junit.jupiter.api.Assertions; - -public final class AgentVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AgentVersionInner model = - BinaryData - .fromString("{\"agentVersion\":\"zbn\",\"downloadLink\":\"lylpstdb\",\"osType\":\"xsrz\"}") - .toObject(AgentVersionInner.class); - Assertions.assertEquals("zbn", model.agentVersion()); - Assertions.assertEquals("lylpstdb", model.downloadLink()); - Assertions.assertEquals("xsrz", model.osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentVersionInner model = - new AgentVersionInner().withAgentVersion("zbn").withDownloadLink("lylpstdb").withOsType("xsrz"); - model = BinaryData.fromObject(model).toObject(AgentVersionInner.class); - Assertions.assertEquals("zbn", model.agentVersion()); - Assertions.assertEquals("lylpstdb", model.downloadLink()); - Assertions.assertEquals("xsrz", model.osType()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsGetWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsGetWithResponseMockTests.java deleted file mode 100644 index 66ade01a7676..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsGetWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hybridcompute.HybridComputeManager; -import com.azure.resourcemanager.hybridcompute.models.AgentVersion; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AgentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"agentVersion\":\"fj\",\"downloadLink\":\"svgjrwhryvy\",\"osType\":\"t\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AgentVersion response = - manager.agentVersions().getWithResponse("vbroylaxxu", "cdisd", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("fj", response.agentVersion()); - Assertions.assertEquals("svgjrwhryvy", response.downloadLink()); - Assertions.assertEquals("t", response.osType()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsListInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsListInnerTests.java deleted file mode 100644 index baaf9cd65572..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsListInnerTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionInner; -import com.azure.resourcemanager.hybridcompute.fluent.models.AgentVersionsListInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AgentVersionsListInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AgentVersionsListInner model = - BinaryData - .fromString( - "{\"value\":[{\"agentVersion\":\"gdrjervnaenqpe\",\"downloadLink\":\"ndoygmifthnzdnd\",\"osType\":\"gnayqigynduh\"},{\"agentVersion\":\"hqlkthumaqo\",\"downloadLink\":\"gycdu\",\"osType\":\"r\"},{\"agentVersion\":\"ccymvaolpsslql\",\"downloadLink\":\"mdnbbglzpswiy\",\"osType\":\"cwyhzdxssa\"}],\"nextLink\":\"zmnvdfznudaod\"}") - .toObject(AgentVersionsListInner.class); - Assertions.assertEquals("gdrjervnaenqpe", model.value().get(0).agentVersion()); - Assertions.assertEquals("ndoygmifthnzdnd", model.value().get(0).downloadLink()); - Assertions.assertEquals("gnayqigynduh", model.value().get(0).osType()); - Assertions.assertEquals("zmnvdfznudaod", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentVersionsListInner model = - new AgentVersionsListInner() - .withValue( - Arrays - .asList( - new AgentVersionInner() - .withAgentVersion("gdrjervnaenqpe") - .withDownloadLink("ndoygmifthnzdnd") - .withOsType("gnayqigynduh"), - new AgentVersionInner() - .withAgentVersion("hqlkthumaqo") - .withDownloadLink("gycdu") - .withOsType("r"), - new AgentVersionInner() - .withAgentVersion("ccymvaolpsslql") - .withDownloadLink("mdnbbglzpswiy") - .withOsType("cwyhzdxssa"))) - .withNextLink("zmnvdfznudaod"); - model = BinaryData.fromObject(model).toObject(AgentVersionsListInner.class); - Assertions.assertEquals("gdrjervnaenqpe", model.value().get(0).agentVersion()); - Assertions.assertEquals("ndoygmifthnzdnd", model.value().get(0).downloadLink()); - Assertions.assertEquals("gnayqigynduh", model.value().get(0).osType()); - Assertions.assertEquals("zmnvdfznudaod", model.nextLink()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsListWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsListWithResponseMockTests.java deleted file mode 100644 index a5d86af6d5aa..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/AgentVersionsListWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hybridcompute.HybridComputeManager; -import com.azure.resourcemanager.hybridcompute.models.AgentVersionsList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AgentVersionsListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"agentVersion\":\"z\",\"downloadLink\":\"es\",\"osType\":\"dlpagzrcxfail\"},{\"agentVersion\":\"xwmdboxd\",\"downloadLink\":\"sftufqobrjlna\",\"osType\":\"cc\"},{\"agentVersion\":\"nhxk\",\"downloadLink\":\"v\",\"osType\":\"nrzvuljraaer\"}],\"nextLink\":\"okqgukkjq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AgentVersionsList response = - manager.agentVersions().listWithResponse("lhhxudbxvodhtnsi", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("z", response.value().get(0).agentVersion()); - Assertions.assertEquals("es", response.value().get(0).downloadLink()); - Assertions.assertEquals("dlpagzrcxfail", response.value().get(0).osType()); - Assertions.assertEquals("okqgukkjq", response.nextLink()); - } -} 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 28fb654bd6f1..10437bf881f9 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 @@ -10,11 +10,9 @@ public final class AvailablePatchCountByClassificationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AvailablePatchCountByClassification model = - BinaryData - .fromString( - "{\"security\":2012409691,\"critical\":752212445,\"definition\":2022325764,\"updateRollup\":1803945661,\"featurePack\":1492267323,\"servicePack\":920557084,\"tools\":223779123,\"updates\":1058497011,\"other\":842863771}") - .toObject(AvailablePatchCountByClassification.class); + AvailablePatchCountByClassification model = BinaryData.fromString( + "{\"security\":1857239406,\"critical\":1149857481,\"definition\":525052628,\"updateRollup\":1405653076,\"featurePack\":1012286032,\"servicePack\":858824887,\"tools\":751467546,\"updates\":2035107412,\"other\":1122692891}") + .toObject(AvailablePatchCountByClassification.class); } @org.junit.jupiter.api.Test 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 60272a78eed5..96dffb99223b 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\":\"uexhdzx\"}").toObject(CloudMetadata.class); + CloudMetadata model = BinaryData.fromString("{\"provider\":\"tymw\"}").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 4c13ae269aa2..266256049f56 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,10 +10,8 @@ public final class ConfigurationExtensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ConfigurationExtension model = - BinaryData - .fromString("{\"publisher\":\"xgcp\",\"type\":\"gmaajrm\"}") - .toObject(ConfigurationExtension.class); + ConfigurationExtension model = BinaryData.fromString("{\"publisher\":\"qawrlyxwj\",\"type\":\"prbnwbxgjvtbv\"}") + .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 78b86c15439f..3cd8735bfb30 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 @@ -10,11 +10,9 @@ public final class ConnectionDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ConnectionDetail model = - BinaryData - .fromString( - "{\"id\":\"qhl\",\"privateIpAddress\":\"riiiojnalghfkv\",\"linkIdentifier\":\"sexso\",\"groupId\":\"el\",\"memberName\":\"hhahhxvrhmzkwpjg\"}") - .toObject(ConnectionDetail.class); + ConnectionDetail model = BinaryData.fromString( + "{\"id\":\"j\",\"privateIpAddress\":\"wuenvr\",\"linkIdentifier\":\"yo\",\"groupId\":\"ibreb\",\"memberName\":\"aysjkixqtnqttez\"}") + .toObject(ConnectionDetail.class); } @org.junit.jupiter.api.Test 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 f0a589b4cbe6..27a93980fb28 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,17 +11,16 @@ public final class EsuKeyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EsuKey model = - BinaryData.fromString("{\"sku\":\"ltyfsop\",\"licenseStatus\":\"suesnzw\"}").toObject(EsuKey.class); - Assertions.assertEquals("ltyfsop", model.sku()); - Assertions.assertEquals("suesnzw", model.licenseStatus()); + EsuKey model = BinaryData.fromString("{\"sku\":\"x\",\"licenseStatus\":\"qgtz\"}").toObject(EsuKey.class); + Assertions.assertEquals("x", model.sku()); + Assertions.assertEquals("qgtz", model.licenseStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EsuKey model = new EsuKey().withSku("ltyfsop").withLicenseStatus("suesnzw"); + EsuKey model = new EsuKey().withSku("x").withLicenseStatus("qgtz"); model = BinaryData.fromObject(model).toObject(EsuKey.class); - Assertions.assertEquals("ltyfsop", model.sku()); - Assertions.assertEquals("suesnzw", model.licenseStatus()); + Assertions.assertEquals("x", model.sku()); + Assertions.assertEquals("qgtz", 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 a4ea4bb5cd47..ea3e51c73f8c 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,17 +11,15 @@ public final class EsuProfileUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EsuProfileUpdateProperties model = - BinaryData - .fromString("{\"assignedLicense\":\"zoqftiyqzrnkcqvy\"}") - .toObject(EsuProfileUpdateProperties.class); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.assignedLicense()); + EsuProfileUpdateProperties model + = BinaryData.fromString("{\"assignedLicense\":\"euzvx\"}").toObject(EsuProfileUpdateProperties.class); + Assertions.assertEquals("euzvx", model.assignedLicense()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EsuProfileUpdateProperties model = new EsuProfileUpdateProperties().withAssignedLicense("zoqftiyqzrnkcqvy"); + EsuProfileUpdateProperties model = new EsuProfileUpdateProperties().withAssignedLicense("euzvx"); model = BinaryData.fromObject(model).toObject(EsuProfileUpdateProperties.class); - Assertions.assertEquals("zoqftiyqzrnkcqvy", model.assignedLicense()); + Assertions.assertEquals("euzvx", 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 cb05af8858ff..e0d0fc98ab37 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 @@ -6,62 +6,33 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.ExtensionValue; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ExtensionMetadatasGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"version\":\"sqy\",\"extensionType\":\"foobrlttyms\",\"publisher\":\"ygqdnfwqzdz\"},\"id\":\"ilaxhn\",\"name\":\"hqlyvijo\",\"type\":\"wivkxo\"}"; - String responseStr = - "{\"properties\":{\"version\":\"la\",\"extensionType\":\"nfhqlyvijouwivk\",\"publisher\":\"yzunbixxrtikv\"},\"id\":\"wpgclrcivt\",\"name\":\"oxfrkenxpmyyefr\",\"type\":\"mpdnqqskawa\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + ExtensionValue response = manager.extensionMetadatas() + .getWithResponse("zhhzjhfjmhvvmu", "gpmuneqsxvmhfbuz", "yihsasbhudypohyu", "ms", + com.azure.core.util.Context.NONE) + .getValue(); - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ExtensionValue response = - manager - .extensionMetadatas() - .getWithResponse("ms", "ynsqyrpfoobr", "ttymsjny", "qdnfwqzdz", 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 f5a68c2478b6..774158fdaf2e 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 @@ -6,60 +6,32 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.ExtensionValue; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ExtensionMetadatasListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"properties\":{\"version\":\"soxfrken\",\"extensionType\":\"m\",\"publisher\":\"efrp\"},\"id\":\"dnqqskawaoqvmmb\",\"name\":\"pqfrtqlkz\",\"type\":\"egnitg\"}]}"; - String responseStr = - "{\"value\":[{\"properties\":{\"version\":\"tgvkxlzyqd\",\"extensionType\":\"eg\",\"publisher\":\"alzxwhcan\"},\"id\":\"moy\",\"name\":\"hlwigdivbkbxg\",\"type\":\"mf\"}]}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + PagedIterable response + = manager.extensionMetadatas().list("zunbixx", "ti", "vcpwpgclrc", com.azure.core.util.Context.NONE); - 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.extensionMetadatas().list("qvmmbn", "qfr", "qlkzme", 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 3e664d55abc8..348709960e86 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\":\"gqzcjr\"}").toObject(ExtensionTargetProperties.class); - Assertions.assertEquals("gqzcjr", model.targetVersion()); + ExtensionTargetProperties model + = BinaryData.fromString("{\"targetVersion\":\"qbhsfxobl\"}").toObject(ExtensionTargetProperties.class); + Assertions.assertEquals("qbhsfxobl", model.targetVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ExtensionTargetProperties model = new ExtensionTargetProperties().withTargetVersion("gqzcjr"); + ExtensionTargetProperties model = new ExtensionTargetProperties().withTargetVersion("qbhsfxobl"); model = BinaryData.fromObject(model).toObject(ExtensionTargetProperties.class); - Assertions.assertEquals("gqzcjr", model.targetVersion()); + Assertions.assertEquals("qbhsfxobl", 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 a9ddbbc341b0..4598391eabfa 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 @@ -10,11 +10,9 @@ public final class ExtensionValueInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExtensionValueInner model = - BinaryData - .fromString( - "{\"properties\":{\"version\":\"jzlmw\",\"extensionType\":\"kvugfhzovawjvzun\",\"publisher\":\"thnnpr\"},\"id\":\"i\",\"name\":\"eilpjzuaejxdu\",\"type\":\"tskzbbtdzumveek\"}") - .toObject(ExtensionValueInner.class); + ExtensionValueInner model = BinaryData.fromString( + "{\"properties\":{\"version\":\"blmpewww\",\"extensionType\":\"krvrns\",\"publisher\":\"hqjohxcrsbfova\"},\"id\":\"ruvw\",\"name\":\"hsqfsubcgjbirxbp\",\"type\":\"bsrfbj\"}") + .toObject(ExtensionValueInner.class); } @org.junit.jupiter.api.Test 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 99aeb3ee3321..e4a67ea0b96d 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 @@ -10,11 +10,9 @@ public final class ExtensionValueListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExtensionValueListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"version\":\"waboe\",\"extensionType\":\"v\",\"publisher\":\"lns\"},\"id\":\"bxwyjsflhhcaa\",\"name\":\"n\",\"type\":\"ixisxyawjoy\"},{\"properties\":{\"version\":\"slyjpkiid\",\"extensionType\":\"exznelixhnr\",\"publisher\":\"folhbnxknal\"},\"id\":\"lp\",\"name\":\"ggdtpnapnyiro\",\"type\":\"uhpigvp\"},{\"properties\":{\"version\":\"gqgitxmedjvcsl\",\"extensionType\":\"qwwncw\",\"publisher\":\"hxg\"},\"id\":\"rmgucnap\",\"name\":\"t\",\"type\":\"oellwp\"}]}") - .toObject(ExtensionValueListResult.class); + ExtensionValueListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"version\":\"uoujmkcjhwqy\",\"extensionType\":\"r\",\"publisher\":\"n\"},\"id\":\"ewgdrjervn\",\"name\":\"enq\",\"type\":\"eh\"},{\"properties\":{\"version\":\"oygmift\",\"extensionType\":\"zdnds\",\"publisher\":\"nayqi\"},\"id\":\"nduhavhqlkthum\",\"name\":\"qolbgyc\",\"type\":\"uie\"},{\"properties\":{\"version\":\"ccymvaolpsslql\",\"extensionType\":\"mdnbbglzpswiy\",\"publisher\":\"cwyhzdxssa\"},\"id\":\"zmnvdfznudaod\",\"name\":\"xzb\",\"type\":\"cblylpstdbhhxsr\"}]}") + .toObject(ExtensionValueListResult.class); } @org.junit.jupiter.api.Test 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 d38a44fa7560..69216d70111b 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 @@ -10,10 +10,9 @@ public final class ExtensionValuePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ExtensionValueProperties model = - BinaryData - .fromString("{\"version\":\"wozuhkf\",\"extensionType\":\"sjyofdx\",\"publisher\":\"us\"}") - .toObject(ExtensionValueProperties.class); + ExtensionValueProperties model = BinaryData + .fromString("{\"version\":\"twss\",\"extensionType\":\"ftpvjzbexil\",\"publisher\":\"nfqqnvwp\"}") + .toObject(ExtensionValueProperties.class); } @org.junit.jupiter.api.Test 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 9c32e56f7e2e..21275cfd6560 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 @@ -15,28 +15,24 @@ public final class HybridComputePrivateLinkScopeInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - HybridComputePrivateLinkScopeInner model = - BinaryData - .fromString( - "{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"uwsyrsndsytgadg\",\"privateLinkScopeId\":\"aeaeneqnzarrw\",\"privateEndpointConnections\":[{\"id\":\"ijfqkacewiipfp\",\"name\":\"ji\",\"type\":\"wifto\",\"properties\":{\"privateEndpoint\":{\"id\":\"puvks\"},\"privateLinkServiceConnectionState\":{\"status\":\"lsa\",\"description\":\"nynfsynljphuo\",\"actionsRequired\":\"odlqiyntor\"},\"provisioningState\":\"hleosjsw\",\"groupIds\":[\"slyzrpzbchckqq\",\"qioxi\",\"suiizynkedyat\",\"wyhqmibzyhwits\"]}}]},\"location\":\"pyy\",\"tags\":{\"nmabik\":\"dpumnzgmw\"},\"id\":\"sorgj\",\"name\":\"xbldtlwwrlkdmtn\",\"type\":\"vokotllxdyh\"}") - .toObject(HybridComputePrivateLinkScopeInner.class); - Assertions.assertEquals("pyy", model.location()); - Assertions.assertEquals("dpumnzgmw", model.tags().get("nmabik")); + HybridComputePrivateLinkScopeInner model = BinaryData.fromString( + "{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"cskfcktqumiekk\",\"privateLinkScopeId\":\"zikhl\",\"privateEndpointConnections\":[{\"id\":\"dgqggebdu\",\"name\":\"g\",\"type\":\"qidbqfatpxllrxcy\",\"properties\":{\"privateEndpoint\":{\"id\":\"dsuvarmywdmjsjqb\"},\"privateLinkServiceConnectionState\":{\"status\":\"hyxxrwlycoduhpk\",\"description\":\"kgymareqnajxqug\",\"actionsRequired\":\"ky\"},\"provisioningState\":\"beddgssofw\",\"groupIds\":[\"qal\",\"rmnjijpx\",\"cqqudf\",\"byxbaaabjy\"]}},{\"id\":\"yffimrzrtuzqogs\",\"name\":\"nevfdnw\",\"type\":\"mewzsyyc\",\"properties\":{\"privateEndpoint\":{\"id\":\"oibjudpfrxtrthz\"},\"privateLinkServiceConnectionState\":{\"status\":\"ytdw\",\"description\":\"qbrqubpaxhexiili\",\"actionsRequired\":\"dtiirqt\"},\"provisioningState\":\"oaxoruzfgsqu\",\"groupIds\":[\"rxxle\",\"tramxjez\"]}},{\"id\":\"wnwxuqlcvyd\",\"name\":\"atdooaojkniod\",\"type\":\"oebwnujhemms\",\"properties\":{\"privateEndpoint\":{\"id\":\"c\"},\"privateLinkServiceConnectionState\":{\"status\":\"dtjinfw\",\"description\":\"lfltka\",\"actionsRequired\":\"vefkdlfoakggk\"},\"provisioningState\":\"agaowpulpqblylsy\",\"groupIds\":[\"jnsjervtiagxsd\",\"zuempsbzkf\",\"beyvpnqicvinvkjj\"]}},{\"id\":\"xrbuukzclew\",\"name\":\"mlwpazt\",\"type\":\"ofncckwyfzqwhxxb\",\"properties\":{\"privateEndpoint\":{\"id\":\"xzfe\"},\"privateLinkServiceConnectionState\":{\"status\":\"tpp\",\"description\":\"iolxor\",\"actionsRequired\":\"lt\"},\"provisioningState\":\"mncwsobqwcsdb\",\"groupIds\":[\"cf\",\"ucqdpfuvglsb\",\"jcanvxbvtvudut\"]}}]},\"location\":\"ormrlxqtvcofudfl\",\"tags\":{\"dknnqvsazn\":\"jub\"},\"id\":\"n\",\"name\":\"orudsgsa\",\"type\":\"mkycgra\"}") + .toObject(HybridComputePrivateLinkScopeInner.class); + Assertions.assertEquals("ormrlxqtvcofudfl", model.location()); + Assertions.assertEquals("jub", model.tags().get("dknnqvsazn")); Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.properties().publicNetworkAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HybridComputePrivateLinkScopeInner model = - new HybridComputePrivateLinkScopeInner() - .withLocation("pyy") - .withTags(mapOf("nmabik", "dpumnzgmw")) - .withProperties( - new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.ENABLED)); + HybridComputePrivateLinkScopeInner model = new HybridComputePrivateLinkScopeInner() + .withLocation("ormrlxqtvcofudfl") + .withTags(mapOf("dknnqvsazn", "jub")) + .withProperties( + new HybridComputePrivateLinkScopeProperties().withPublicNetworkAccess(PublicNetworkAccessType.ENABLED)); model = BinaryData.fromObject(model).toObject(HybridComputePrivateLinkScopeInner.class); - Assertions.assertEquals("pyy", model.location()); - Assertions.assertEquals("dpumnzgmw", model.tags().get("nmabik")); + Assertions.assertEquals("ormrlxqtvcofudfl", model.location()); + Assertions.assertEquals("jub", model.tags().get("dknnqvsazn")); Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.properties().publicNetworkAccess()); } 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 e895715184d9..ec5697857da6 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 @@ -17,65 +17,31 @@ public final class HybridComputePrivateLinkScopeListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - HybridComputePrivateLinkScopeListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"scdntnevf\",\"privateLinkScopeId\":\"jmygtdsslswtmwer\",\"privateEndpointConnections\":[{\"id\":\"pyqs\",\"name\":\"wab\",\"type\":\"tshhszhedp\",\"properties\":{}}]},\"location\":\"iwubmwmbesldnk\",\"tags\":{\"flcxoga\":\"pp\",\"mkqzeqqkdltfzxmh\":\"konzmnsik\"},\"id\":\"v\",\"name\":\"gureodkwobdag\",\"type\":\"tibqdxbxwakb\"},{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"dlkzgxhuri\",\"privateLinkScopeId\":\"bpodxunkbebxm\",\"privateEndpointConnections\":[{\"id\":\"ntwlrbqtkoie\",\"name\":\"eotg\",\"type\":\"l\",\"properties\":{}},{\"id\":\"u\",\"name\":\"auwzizxbmpgc\",\"type\":\"fuzmuvpbtt\",\"properties\":{}}]},\"location\":\"orppxebmnzbtb\",\"tags\":{\"hdneuelfph\":\"glkfg\",\"xzxcl\":\"dyhtozfikdowwquu\"},\"id\":\"ithhqzon\",\"name\":\"sg\",\"type\":\"b\"},{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"wdsjnkalju\",\"privateLinkScopeId\":\"iswac\",\"privateEndpointConnections\":[{\"id\":\"k\",\"name\":\"ewkfvhqcrai\",\"type\":\"pnppfuf\",\"properties\":{}}]},\"location\":\"dmhdlxyjr\",\"tags\":{\"bcvkcvqvpkeq\":\"gafcnihgwqapnedg\",\"obzdopcjwvnhdl\":\"cvdrhvoodsot\",\"mutwuoe\":\"wmgxcxrsl\",\"yqsluic\":\"rpkhjwn\"},\"id\":\"dggkzzlvmbmpa\",\"name\":\"modfvuefywsbpfvm\",\"type\":\"yhrfouyftaakcpw\"},{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"tmnubexkpzksmon\",\"privateLinkScopeId\":\"mquxvypo\",\"privateEndpointConnections\":[{\"id\":\"pkwhojvpa\",\"name\":\"gxysmocmbqfqvm\",\"type\":\"xozap\",\"properties\":{}},{\"id\":\"lxprglyatddckcbc\",\"name\":\"jrjxgciqibrhosx\",\"type\":\"qrhzoymibmrqyib\",\"properties\":{}},{\"id\":\"fluszdtm\",\"name\":\"kwofyyvoq\",\"type\":\"piexpbtgiw\",\"properties\":{}},{\"id\":\"enwash\",\"name\":\"dtkcnqxwbpokulp\",\"type\":\"jwaa\",\"properties\":{}}]},\"location\":\"qiiobyuqer\",\"tags\":{\"fbtkuwhhmhyk\":\"pqwcciuqgbdbutau\"},\"id\":\"joxafnndlpi\",\"name\":\"hkoymkcdyhbp\",\"type\":\"kpw\"}],\"nextLink\":\"eqnovvqfovl\"}") - .toObject(HybridComputePrivateLinkScopeListResult.class); - Assertions.assertEquals("iwubmwmbesldnk", model.value().get(0).location()); - Assertions.assertEquals("pp", model.value().get(0).tags().get("flcxoga")); - Assertions - .assertEquals(PublicNetworkAccessType.DISABLED, model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals("eqnovvqfovl", model.nextLink()); + HybridComputePrivateLinkScopeListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"la\",\"privateLinkScopeId\":\"elwuipi\",\"privateEndpointConnections\":[{\"id\":\"kzivgvvcnayrh\",\"name\":\"nxxmueedndrdv\",\"type\":\"kwqqtchealmf\",\"properties\":{}},{\"id\":\"aayg\",\"name\":\"wvgpiohg\",\"type\":\"rtfudxepxg\",\"properties\":{}}]},\"location\":\"gvr\",\"tags\":{\"dblx\":\"pkukghi\",\"fnjhfjxwmszkkfo\":\"wi\",\"kzikfjawneaivxwc\":\"rey\",\"fatkld\":\"elpcirelsfeaenwa\"},\"id\":\"xbjhwuaanozjosph\",\"name\":\"oulpjrv\",\"type\":\"ag\"}],\"nextLink\":\"vimjwos\"}") + .toObject(HybridComputePrivateLinkScopeListResult.class); + Assertions.assertEquals("gvr", model.value().get(0).location()); + Assertions.assertEquals("pkukghi", model.value().get(0).tags().get("dblx")); + Assertions.assertEquals(PublicNetworkAccessType.DISABLED, + model.value().get(0).properties().publicNetworkAccess()); + Assertions.assertEquals("vimjwos", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - HybridComputePrivateLinkScopeListResult model = - new HybridComputePrivateLinkScopeListResult() - .withValue( - Arrays - .asList( - new HybridComputePrivateLinkScopeInner() - .withLocation("iwubmwmbesldnk") - .withTags(mapOf("flcxoga", "pp", "mkqzeqqkdltfzxmh", "konzmnsik")) - .withProperties( - new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED)), - new HybridComputePrivateLinkScopeInner() - .withLocation("orppxebmnzbtb") - .withTags(mapOf("hdneuelfph", "glkfg", "xzxcl", "dyhtozfikdowwquu")) - .withProperties( - new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED)), - new HybridComputePrivateLinkScopeInner() - .withLocation("dmhdlxyjr") - .withTags( - mapOf( - "bcvkcvqvpkeq", - "gafcnihgwqapnedg", - "obzdopcjwvnhdl", - "cvdrhvoodsot", - "mutwuoe", - "wmgxcxrsl", - "yqsluic", - "rpkhjwn")) - .withProperties( - new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED)), - new HybridComputePrivateLinkScopeInner() - .withLocation("qiiobyuqer") - .withTags(mapOf("fbtkuwhhmhyk", "pqwcciuqgbdbutau")) - .withProperties( - new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.ENABLED)))) - .withNextLink("eqnovvqfovl"); + HybridComputePrivateLinkScopeListResult model = new HybridComputePrivateLinkScopeListResult() + .withValue(Arrays.asList(new HybridComputePrivateLinkScopeInner().withLocation("gvr") + .withTags(mapOf("dblx", "pkukghi", "fnjhfjxwmszkkfo", "wi", "kzikfjawneaivxwc", "rey", "fatkld", + "elpcirelsfeaenwa")) + .withProperties(new HybridComputePrivateLinkScopeProperties() + .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED)))) + .withNextLink("vimjwos"); model = BinaryData.fromObject(model).toObject(HybridComputePrivateLinkScopeListResult.class); - Assertions.assertEquals("iwubmwmbesldnk", model.value().get(0).location()); - Assertions.assertEquals("pp", model.value().get(0).tags().get("flcxoga")); - Assertions - .assertEquals(PublicNetworkAccessType.DISABLED, model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals("eqnovvqfovl", model.nextLink()); + Assertions.assertEquals("gvr", model.value().get(0).location()); + Assertions.assertEquals("pkukghi", model.value().get(0).tags().get("dblx")); + Assertions.assertEquals(PublicNetworkAccessType.DISABLED, + model.value().get(0).properties().publicNetworkAccess()); + Assertions.assertEquals("vimjwos", 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 78bff576e0e1..aa4cc89b4b65 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 @@ -12,19 +12,17 @@ public final class HybridComputePrivateLinkScopePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - HybridComputePrivateLinkScopeProperties model = - BinaryData - .fromString( - "{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"cogjltdtbn\",\"privateLinkScopeId\":\"adoocrkvc\",\"privateEndpointConnections\":[{\"id\":\"vpa\",\"name\":\"gxqquezik\",\"type\":\"ggxkallatmelwuip\",\"properties\":{\"privateEndpoint\":{\"id\":\"zkzivgvvcnay\"},\"privateLinkServiceConnectionState\":{\"status\":\"yrnxxmueedn\",\"description\":\"rdvstkwqqtch\",\"actionsRequired\":\"lmfmtdaay\"},\"provisioningState\":\"v\",\"groupIds\":[\"piohgwxrtfu\",\"xepxgyqagvrvmn\",\"k\",\"kghimdblxgwimfnj\"]}},{\"id\":\"j\",\"name\":\"mszkkfo\",\"type\":\"eyfkzikfja\",\"properties\":{\"privateEndpoint\":{\"id\":\"ivx\"},\"privateLinkServiceConnectionState\":{\"status\":\"zel\",\"description\":\"c\",\"actionsRequired\":\"elsfeaen\"},\"provisioningState\":\"bfatklddxbjhwu\",\"groupIds\":[\"oz\"]}},{\"id\":\"sphyoulpjrvxa\",\"name\":\"rvimjwosytxitcsk\",\"type\":\"k\",\"properties\":{\"privateEndpoint\":{\"id\":\"iekkezz\"},\"privateLinkServiceConnectionState\":{\"status\":\"hlyfjhdgqgg\",\"description\":\"bdunygaeqid\",\"actionsRequired\":\"fatpxllrxcyjmoa\"},\"provisioningState\":\"uvarmywdmjsjq\",\"groupIds\":[\"hyxxrwlycoduhpk\",\"kgymareqnajxqug\"]}}]}") - .toObject(HybridComputePrivateLinkScopeProperties.class); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.publicNetworkAccess()); + HybridComputePrivateLinkScopeProperties model = BinaryData.fromString( + "{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"etaebu\",\"privateLinkScopeId\":\"vdmovsmzlxwabm\",\"privateEndpointConnections\":[{\"id\":\"kif\",\"name\":\"tpuqujmq\",\"type\":\"kfbtndoaongbjc\",\"properties\":{\"privateEndpoint\":{\"id\":\"i\"},\"privateLinkServiceConnectionState\":{\"status\":\"jed\",\"description\":\"twwaezkojvdcpzf\",\"actionsRequired\":\"ouicybxarzgszu\"},\"provisioningState\":\"x\",\"groupIds\":[\"opidoamciodh\"]}},{\"id\":\"azxkhnzbonlwnto\",\"name\":\"okdwb\",\"type\":\"kszzcmrvexztv\",\"properties\":{\"privateEndpoint\":{\"id\":\"sfraoyzko\"},\"privateLinkServiceConnectionState\":{\"status\":\"tlmngu\",\"description\":\"aw\",\"actionsRequired\":\"ldsyuuximerqfob\"},\"provisioningState\":\"znkbykutwpfhpagm\",\"groupIds\":[\"kdsnfdsdoakgtdl\",\"kkze\",\"dlhewp\",\"sdsttwvog\"]}}]}") + .toObject(HybridComputePrivateLinkScopeProperties.class); + Assertions.assertEquals(PublicNetworkAccessType.DISABLED, 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.DISABLED); model = BinaryData.fromObject(model).toObject(HybridComputePrivateLinkScopeProperties.class); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, model.publicNetworkAccess()); + Assertions.assertEquals(PublicNetworkAccessType.DISABLED, 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 22757133afe4..5e404a697ae1 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,10 +12,8 @@ public final class IdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Identity model = - BinaryData - .fromString( - "{\"principalId\":\"pocipazyxoegu\",\"tenantId\":\"jnpiucgyg\",\"type\":\"SystemAssigned\"}") + Identity model + = BinaryData.fromString("{\"principalId\":\"pnazzm\",\"tenantId\":\"runmp\",\"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 d445a2aa58b8..1ce3eb5a2de6 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,20 +11,19 @@ public final class IpAddressTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpAddress model = - BinaryData - .fromString( - "{\"address\":\"odsfcpkvxodpuozm\",\"ipAddressVersion\":\"ydagfuaxbe\",\"subnet\":{\"addressPrefix\":\"uokktwhrdxwz\"}}") - .toObject(IpAddress.class); - Assertions.assertEquals("odsfcpkvxodpuozm", model.address()); - Assertions.assertEquals("ydagfuaxbe", model.ipAddressVersion()); + IpAddress model = BinaryData + .fromString( + "{\"address\":\"ggzfbu\",\"ipAddressVersion\":\"mvfaxkffeiith\",\"subnet\":{\"addressPrefix\":\"ez\"}}") + .toObject(IpAddress.class); + Assertions.assertEquals("ggzfbu", model.address()); + Assertions.assertEquals("mvfaxkffeiith", model.ipAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpAddress model = new IpAddress().withAddress("odsfcpkvxodpuozm").withIpAddressVersion("ydagfuaxbe"); + IpAddress model = new IpAddress().withAddress("ggzfbu").withIpAddressVersion("mvfaxkffeiith"); model = BinaryData.fromObject(model).toObject(IpAddress.class); - Assertions.assertEquals("odsfcpkvxodpuozm", model.address()); - Assertions.assertEquals("ydagfuaxbe", model.ipAddressVersion()); + Assertions.assertEquals("ggzfbu", model.address()); + Assertions.assertEquals("mvfaxkffeiith", model.ipAddressVersion()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseDetailsTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseDetailsTests.java index e6829cf3aff4..d184ff8e09ce 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseDetailsTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseDetailsTests.java @@ -15,33 +15,28 @@ public final class LicenseDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LicenseDetails model = - BinaryData - .fromString( - "{\"state\":\"Activated\",\"target\":\"Windows Server 2012" - + " R2\",\"edition\":\"Standard\",\"type\":\"pCore\",\"processors\":365003669,\"assignedLicenses\":1426424508,\"immutableId\":\"ajpsquc\"}") - .toObject(LicenseDetails.class); + LicenseDetails model = BinaryData.fromString( + "{\"state\":\"Activated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":336183826,\"assignedLicenses\":1522081541,\"immutableId\":\"anyktzlcuiywg\"}") + .toObject(LicenseDetails.class); Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.target()); - Assertions.assertEquals(LicenseEdition.STANDARD, model.edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(365003669, model.processors()); + Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); + Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); + Assertions.assertEquals(336183826, model.processors()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LicenseDetails model = - new LicenseDetails() - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) - .withEdition(LicenseEdition.STANDARD) - .withType(LicenseCoreType.P_CORE) - .withProcessors(365003669); + LicenseDetails model = new LicenseDetails().withState(LicenseState.ACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) + .withEdition(LicenseEdition.DATACENTER) + .withType(LicenseCoreType.V_CORE) + .withProcessors(336183826); model = BinaryData.fromObject(model).toObject(LicenseDetails.class); Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.target()); - Assertions.assertEquals(LicenseEdition.STANDARD, model.edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(365003669, model.processors()); + Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); + Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); + Assertions.assertEquals(336183826, model.processors()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseInnerTests.java deleted file mode 100644 index 60db976b8645..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseInnerTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class LicenseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicenseInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Creating\",\"tenantId\":\"uv\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows" - + " Server" - + " 2012\",\"edition\":\"Standard\",\"type\":\"pCore\",\"processors\":1567088551,\"assignedLicenses\":910142536,\"immutableId\":\"sphrupidgs\"}},\"location\":\"bejhphoycmsxa\",\"tags\":{\"zehtbmu\":\"dxbmtqioq\",\"wnoi\":\"p\",\"bqsoqijg\":\"hwlrx\"},\"id\":\"dmbpazlobcufpdz\",\"name\":\"rbt\",\"type\":\"qqjnqgl\"}") - .toObject(LicenseInner.class); - Assertions.assertEquals("bejhphoycmsxa", model.location()); - Assertions.assertEquals("dxbmtqioq", model.tags().get("zehtbmu")); - Assertions.assertEquals("uv", model.tenantId()); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.STANDARD, model.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.licenseDetails().type()); - Assertions.assertEquals(1567088551, model.licenseDetails().processors()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicenseInner model = - new LicenseInner() - .withLocation("bejhphoycmsxa") - .withTags(mapOf("zehtbmu", "dxbmtqioq", "wnoi", "p", "bqsoqijg", "hwlrx")) - .withTenantId("uv") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails( - new LicenseDetails() - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.STANDARD) - .withType(LicenseCoreType.P_CORE) - .withProcessors(1567088551)); - model = BinaryData.fromObject(model).toObject(LicenseInner.class); - Assertions.assertEquals("bejhphoycmsxa", model.location()); - Assertions.assertEquals("dxbmtqioq", model.tags().get("zehtbmu")); - Assertions.assertEquals("uv", model.tenantId()); - Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.STANDARD, model.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.licenseDetails().type()); - Assertions.assertEquals(1567088551, model.licenseDetails().processors()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileArmProductProfilePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileArmProductProfilePropertiesTests.java new file mode 100644 index 000000000000..1b032996ddc7 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileArmProductProfilePropertiesTests.java @@ -0,0 +1,49 @@ +// 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.LicenseProfileArmProductProfileProperties; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatus; +import com.azure.resourcemanager.hybridcompute.models.ProductFeature; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class LicenseProfileArmProductProfilePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LicenseProfileArmProductProfileProperties model = BinaryData.fromString( + "{\"subscriptionStatus\":\"Enabled\",\"productType\":\"WindowsServer\",\"billingStartDate\":\"2021-09-22T23:33:27Z\",\"enrollmentDate\":\"2021-03-31T09:09:52Z\",\"disenrollmentDate\":\"2021-06-06T00:18:07Z\",\"productFeatures\":[{\"name\":\"llnwsubi\",\"subscriptionStatus\":\"Disabled\",\"billingStartDate\":\"2021-08-17T16:47:22Z\",\"enrollmentDate\":\"2021-03-05T06:09:09Z\",\"disenrollmentDate\":\"2021-07-11T00:23:53Z\"},{\"name\":\"zscxaqwo\",\"subscriptionStatus\":\"Enabled\",\"billingStartDate\":\"2021-03-17T19:02:06Z\",\"enrollmentDate\":\"2021-02-14T16:11:22Z\",\"disenrollmentDate\":\"2021-09-03T08:42:26Z\"},{\"name\":\"kvlrxnj\",\"subscriptionStatus\":\"Enabling\",\"billingStartDate\":\"2021-02-05T10:28:18Z\",\"enrollmentDate\":\"2021-10-14T01:51:13Z\",\"disenrollmentDate\":\"2021-04-09T12:47:30Z\"},{\"name\":\"lokeyy\",\"subscriptionStatus\":\"Unknown\",\"billingStartDate\":\"2021-10-04T06:36:31Z\",\"enrollmentDate\":\"2021-04-10T02:54:21Z\",\"disenrollmentDate\":\"2021-10-26T11:35:52Z\"}]}") + .toObject(LicenseProfileArmProductProfileProperties.class); + Assertions.assertEquals(LicenseProfileSubscriptionStatus.ENABLED, model.subscriptionStatus()); + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); + Assertions.assertEquals("llnwsubi", model.productFeatures().get(0).name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatus.DISABLED, + model.productFeatures().get(0).subscriptionStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LicenseProfileArmProductProfileProperties model = new LicenseProfileArmProductProfileProperties() + .withSubscriptionStatus(LicenseProfileSubscriptionStatus.ENABLED) + .withProductType(LicenseProfileProductType.WINDOWS_SERVER) + .withProductFeatures(Arrays.asList( + new ProductFeature().withName("llnwsubi") + .withSubscriptionStatus(LicenseProfileSubscriptionStatus.DISABLED), + new ProductFeature().withName("zscxaqwo") + .withSubscriptionStatus(LicenseProfileSubscriptionStatus.ENABLED), + new ProductFeature().withName("kvlrxnj") + .withSubscriptionStatus(LicenseProfileSubscriptionStatus.ENABLING), + new ProductFeature().withName("lokeyy") + .withSubscriptionStatus(LicenseProfileSubscriptionStatus.UNKNOWN))); + model = BinaryData.fromObject(model).toObject(LicenseProfileArmProductProfileProperties.class); + Assertions.assertEquals(LicenseProfileSubscriptionStatus.ENABLED, model.subscriptionStatus()); + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); + Assertions.assertEquals("llnwsubi", model.productFeatures().get(0).name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatus.DISABLED, + model.productFeatures().get(0).subscriptionStatus()); + } +} 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 new file mode 100644 index 000000000000..d38808e36c16 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileMachineInstanceViewSoftwareAssuranceTests.java @@ -0,0 +1,27 @@ +// 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.LicenseProfileMachineInstanceViewSoftwareAssurance; +import org.junit.jupiter.api.Assertions; + +public final class LicenseProfileMachineInstanceViewSoftwareAssuranceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LicenseProfileMachineInstanceViewSoftwareAssurance model + = BinaryData.fromString("{\"softwareAssuranceCustomer\":false}") + .toObject(LicenseProfileMachineInstanceViewSoftwareAssurance.class); + Assertions.assertEquals(false, model.softwareAssuranceCustomer()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LicenseProfileMachineInstanceViewSoftwareAssurance model + = new LicenseProfileMachineInstanceViewSoftwareAssurance().withSoftwareAssuranceCustomer(false); + model = BinaryData.fromObject(model).toObject(LicenseProfileMachineInstanceViewSoftwareAssurance.class); + Assertions.assertEquals(false, 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 new file mode 100644 index 000000000000..bbdabc294395 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseProfileUpdatePropertiesSoftwareAssuranceTests.java @@ -0,0 +1,27 @@ +// 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.LicenseProfileUpdatePropertiesSoftwareAssurance; +import org.junit.jupiter.api.Assertions; + +public final class LicenseProfileUpdatePropertiesSoftwareAssuranceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + LicenseProfileUpdatePropertiesSoftwareAssurance model + = BinaryData.fromString("{\"softwareAssuranceCustomer\":true}") + .toObject(LicenseProfileUpdatePropertiesSoftwareAssurance.class); + Assertions.assertEquals(true, model.softwareAssuranceCustomer()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + LicenseProfileUpdatePropertiesSoftwareAssurance model + = new LicenseProfileUpdatePropertiesSoftwareAssurance().withSoftwareAssuranceCustomer(true); + model = BinaryData.fromObject(model).toObject(LicenseProfileUpdatePropertiesSoftwareAssurance.class); + 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 bd791be0a5a9..0c268a8b051d 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 @@ -6,23 +6,47 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseProfileUpdateProperties; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; +import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; +import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class LicenseProfileUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LicenseProfileUpdateProperties model = - BinaryData - .fromString("{\"esuProfile\":{\"assignedLicense\":\"ixzbinjeputtmryw\"}}") - .toObject(LicenseProfileUpdateProperties.class); - Assertions.assertEquals("ixzbinjeputtmryw", model.assignedLicense()); + LicenseProfileUpdateProperties model = BinaryData.fromString( + "{\"softwareAssurance\":{\"softwareAssuranceCustomer\":false},\"esuProfile\":{\"assignedLicense\":\"fhir\"},\"productProfile\":{\"subscriptionStatus\":\"Enable\",\"productType\":\"WindowsIoTEnterprise\",\"productFeatures\":[{\"name\":\"pipiwyczuhxac\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"ihhyuspskasd\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"wdgzxulucv\",\"subscriptionStatus\":\"Disable\"}]}}") + .toObject(LicenseProfileUpdateProperties.class); + Assertions.assertEquals(false, model.softwareAssuranceCustomer()); + Assertions.assertEquals("fhir", model.assignedLicense()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_IO_TENTERPRISE, model.productType()); + Assertions.assertEquals("pipiwyczuhxac", 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().withAssignedLicense("ixzbinjeputtmryw"); + LicenseProfileUpdateProperties model = new LicenseProfileUpdateProperties().withSoftwareAssuranceCustomer(false) + .withAssignedLicense("fhir") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE) + .withProductType(LicenseProfileProductType.WINDOWS_IO_TENTERPRISE) + .withProductFeatures(Arrays.asList( + new ProductFeatureUpdate().withName("pipiwyczuhxac") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE), + new ProductFeatureUpdate().withName("ihhyuspskasd") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE), + new ProductFeatureUpdate().withName("wdgzxulucv") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE))); model = BinaryData.fromObject(model).toObject(LicenseProfileUpdateProperties.class); - Assertions.assertEquals("ixzbinjeputtmryw", model.assignedLicense()); + Assertions.assertEquals(false, model.softwareAssuranceCustomer()); + Assertions.assertEquals("fhir", model.assignedLicense()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_IO_TENTERPRISE, model.productType()); + Assertions.assertEquals("pipiwyczuhxac", 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 0c44c097dd7b..2b3aac06f23c 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 @@ -5,7 +5,11 @@ package com.azure.resourcemanager.hybridcompute.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; import com.azure.resourcemanager.hybridcompute.models.LicenseProfileUpdate; +import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; @@ -13,22 +17,44 @@ public final class LicenseProfileUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LicenseProfileUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"esuProfile\":{\"assignedLicense\":\"a\"}},\"tags\":{\"nowkgshw\":\"hagalpbuxwgipwh\"}}") - .toObject(LicenseProfileUpdate.class); - Assertions.assertEquals("hagalpbuxwgipwh", model.tags().get("nowkgshw")); - Assertions.assertEquals("a", model.assignedLicense()); + LicenseProfileUpdate model = BinaryData.fromString( + "{\"properties\":{\"softwareAssurance\":{\"softwareAssuranceCustomer\":false},\"esuProfile\":{\"assignedLicense\":\"ydxtqm\"},\"productProfile\":{\"subscriptionStatus\":\"Enable\",\"productType\":\"WindowsServer\",\"productFeatures\":[{\"name\":\"f\",\"subscriptionStatus\":\"Disable\"},{\"name\":\"mtbghh\",\"subscriptionStatus\":\"Enable\"},{\"name\":\"vkffovjzhpjb\",\"subscriptionStatus\":\"Disable\"}]}},\"tags\":{\"cluyovwxnbkf\":\"fxumv\",\"zbomvzzbtdcqvpni\":\"zzxscyhwzdgiruj\",\"n\":\"ujviylwdshfs\",\"rymsgaojfmw\":\"bgye\"}}") + .toObject(LicenseProfileUpdate.class); + Assertions.assertEquals("fxumv", model.tags().get("cluyovwxnbkf")); + Assertions.assertEquals(false, model.softwareAssuranceCustomer()); + Assertions.assertEquals("ydxtqm", model.assignedLicense()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); + Assertions.assertEquals("f", model.productFeatures().get(0).name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, + model.productFeatures().get(0).subscriptionStatus()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LicenseProfileUpdate model = - new LicenseProfileUpdate().withTags(mapOf("nowkgshw", "hagalpbuxwgipwh")).withAssignedLicense("a"); + LicenseProfileUpdate model = new LicenseProfileUpdate() + .withTags(mapOf("cluyovwxnbkf", "fxumv", "zbomvzzbtdcqvpni", "zzxscyhwzdgiruj", "n", "ujviylwdshfs", + "rymsgaojfmw", "bgye")) + .withSoftwareAssuranceCustomer(false) + .withAssignedLicense("ydxtqm") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE) + .withProductType(LicenseProfileProductType.WINDOWS_SERVER) + .withProductFeatures(Arrays.asList( + new ProductFeatureUpdate().withName("f") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE), + new ProductFeatureUpdate().withName("mtbghh") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE), + new ProductFeatureUpdate().withName("vkffovjzhpjb") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.DISABLE))); model = BinaryData.fromObject(model).toObject(LicenseProfileUpdate.class); - Assertions.assertEquals("hagalpbuxwgipwh", model.tags().get("nowkgshw")); - Assertions.assertEquals("a", model.assignedLicense()); + Assertions.assertEquals("fxumv", model.tags().get("cluyovwxnbkf")); + Assertions.assertEquals(false, model.softwareAssuranceCustomer()); + Assertions.assertEquals("ydxtqm", model.assignedLicense()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); + Assertions.assertEquals("f", model.productFeatures().get(0).name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.DISABLE, + model.productFeatures().get(0).subscriptionStatus()); } // Use "Map.of" if available diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensePropertiesTests.java index c448f5f91883..ecbde2e9b8e2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensePropertiesTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensePropertiesTests.java @@ -17,42 +17,34 @@ public final class LicensePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LicenseProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Succeeded\",\"tenantId\":\"ufo\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows" - + " Server" - + " 2012\",\"edition\":\"Standard\",\"type\":\"pCore\",\"processors\":641449848,\"assignedLicenses\":30947494,\"immutableId\":\"glzlhjxrifkwmrv\"}}") - .toObject(LicenseProperties.class); - Assertions.assertEquals("ufo", model.tenantId()); + LicenseProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Accepted\",\"tenantId\":\"efgugnxk\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"pCore\",\"processors\":2050810494,\"assignedLicenses\":960901742,\"immutableId\":\"bhj\"}}") + .toObject(LicenseProperties.class); + Assertions.assertEquals("efgugnxk", model.tenantId()); Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, model.licenseDetails().state()); + Assertions.assertEquals(LicenseState.ACTIVATED, model.licenseDetails().state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.licenseDetails().target()); Assertions.assertEquals(LicenseEdition.STANDARD, model.licenseDetails().edition()); Assertions.assertEquals(LicenseCoreType.P_CORE, model.licenseDetails().type()); - Assertions.assertEquals(641449848, model.licenseDetails().processors()); + Assertions.assertEquals(2050810494, model.licenseDetails().processors()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LicenseProperties model = - new LicenseProperties() - .withTenantId("ufo") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails( - new LicenseDetails() - .withState(LicenseState.DEACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.STANDARD) - .withType(LicenseCoreType.P_CORE) - .withProcessors(641449848)); + LicenseProperties model = new LicenseProperties().withTenantId("efgugnxk") + .withLicenseType(LicenseType.ESU) + .withLicenseDetails(new LicenseDetails().withState(LicenseState.ACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012) + .withEdition(LicenseEdition.STANDARD) + .withType(LicenseCoreType.P_CORE) + .withProcessors(2050810494)); model = BinaryData.fromObject(model).toObject(LicenseProperties.class); - Assertions.assertEquals("ufo", model.tenantId()); + Assertions.assertEquals("efgugnxk", model.tenantId()); Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.DEACTIVATED, model.licenseDetails().state()); + Assertions.assertEquals(LicenseState.ACTIVATED, model.licenseDetails().state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.licenseDetails().target()); Assertions.assertEquals(LicenseEdition.STANDARD, model.licenseDetails().edition()); Assertions.assertEquals(LicenseCoreType.P_CORE, model.licenseDetails().type()); - Assertions.assertEquals(641449848, model.licenseDetails().processors()); + Assertions.assertEquals(2050810494, model.licenseDetails().processors()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseTests.java new file mode 100644 index 000000000000..b422070c63ed --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseTests.java @@ -0,0 +1,70 @@ +// 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.License; +import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; +import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; +import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; +import com.azure.resourcemanager.hybridcompute.models.LicenseState; +import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; +import com.azure.resourcemanager.hybridcompute.models.LicenseType; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class LicenseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + License model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Deleting\",\"tenantId\":\"glmjth\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":1686193188,\"assignedLicenses\":102046613,\"immutableId\":\"hkh\"}},\"location\":\"uigdtopbobjog\",\"tags\":{\"a\":\"w\"},\"id\":\"a\",\"name\":\"hrzayvvtpgvdf\",\"type\":\"iotkftutqxl\"}") + .toObject(License.class); + Assertions.assertEquals("uigdtopbobjog", model.location()); + Assertions.assertEquals("w", model.tags().get("a")); + Assertions.assertEquals("glmjth", model.tenantId()); + Assertions.assertEquals(LicenseType.ESU, model.licenseType()); + Assertions.assertEquals(LicenseState.DEACTIVATED, model.licenseDetails().state()); + Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.licenseDetails().target()); + Assertions.assertEquals(LicenseEdition.STANDARD, model.licenseDetails().edition()); + Assertions.assertEquals(LicenseCoreType.V_CORE, model.licenseDetails().type()); + Assertions.assertEquals(1686193188, model.licenseDetails().processors()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + License model = new License().withLocation("uigdtopbobjog") + .withTags(mapOf("a", "w")) + .withTenantId("glmjth") + .withLicenseType(LicenseType.ESU) + .withLicenseDetails(new LicenseDetails().withState(LicenseState.DEACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012) + .withEdition(LicenseEdition.STANDARD) + .withType(LicenseCoreType.V_CORE) + .withProcessors(1686193188)); + model = BinaryData.fromObject(model).toObject(License.class); + Assertions.assertEquals("uigdtopbobjog", model.location()); + Assertions.assertEquals("w", model.tags().get("a")); + Assertions.assertEquals("glmjth", model.tenantId()); + Assertions.assertEquals(LicenseType.ESU, model.licenseType()); + Assertions.assertEquals(LicenseState.DEACTIVATED, model.licenseDetails().state()); + Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.licenseDetails().target()); + Assertions.assertEquals(LicenseEdition.STANDARD, model.licenseDetails().edition()); + Assertions.assertEquals(LicenseCoreType.V_CORE, model.licenseDetails().type()); + Assertions.assertEquals(1686193188, model.licenseDetails().processors()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesLicenseDetailsTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesLicenseDetailsTests.java index 66d967e67aee..2f0ae78d878a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesLicenseDetailsTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesLicenseDetailsTests.java @@ -15,33 +15,29 @@ public final class LicenseUpdatePropertiesLicenseDetailsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LicenseUpdatePropertiesLicenseDetails model = - BinaryData - .fromString( - "{\"state\":\"Activated\",\"target\":\"Windows Server 2012" - + " R2\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":1654422017}") - .toObject(LicenseUpdatePropertiesLicenseDetails.class); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); + LicenseUpdatePropertiesLicenseDetails model = BinaryData.fromString( + "{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":14690300}") + .toObject(LicenseUpdatePropertiesLicenseDetails.class); + Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.target()); Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); - Assertions.assertEquals(1654422017, model.processors()); + Assertions.assertEquals(14690300, model.processors()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LicenseUpdatePropertiesLicenseDetails model = - new LicenseUpdatePropertiesLicenseDetails() - .withState(LicenseState.ACTIVATED) + LicenseUpdatePropertiesLicenseDetails model + = new LicenseUpdatePropertiesLicenseDetails().withState(LicenseState.DEACTIVATED) .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) .withEdition(LicenseEdition.DATACENTER) .withType(LicenseCoreType.V_CORE) - .withProcessors(1654422017); + .withProcessors(14690300); model = BinaryData.fromObject(model).toObject(LicenseUpdatePropertiesLicenseDetails.class); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); + Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.target()); Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); - Assertions.assertEquals(1654422017, model.processors()); + Assertions.assertEquals(14690300, model.processors()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesTests.java index 1faa92fa7d81..1098de4fc175 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdatePropertiesTests.java @@ -16,36 +16,31 @@ public final class LicenseUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LicenseUpdateProperties model = - BinaryData - .fromString( - "{\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows Server" - + " 2012\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":984757597}}") - .toObject(LicenseUpdateProperties.class); + LicenseUpdateProperties model = BinaryData.fromString( + "{\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":610729333}}") + .toObject(LicenseUpdateProperties.class); Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(984757597, model.processors()); + Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); + Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.target()); + Assertions.assertEquals(LicenseEdition.STANDARD, model.edition()); + Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); + Assertions.assertEquals(610729333, model.processors()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LicenseUpdateProperties model = - new LicenseUpdateProperties() - .withLicenseType(LicenseType.ESU) - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(984757597); + LicenseUpdateProperties model = new LicenseUpdateProperties().withLicenseType(LicenseType.ESU) + .withState(LicenseState.DEACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) + .withEdition(LicenseEdition.STANDARD) + .withType(LicenseCoreType.V_CORE) + .withProcessors(610729333); model = BinaryData.fromObject(model).toObject(LicenseUpdateProperties.class); Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); - Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(984757597, model.processors()); + Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); + Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.target()); + Assertions.assertEquals(LicenseEdition.STANDARD, model.edition()); + Assertions.assertEquals(LicenseCoreType.V_CORE, model.type()); + Assertions.assertEquals(610729333, model.processors()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdateTests.java index c9705e2ff913..a15e68b03981 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdateTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicenseUpdateTests.java @@ -18,41 +18,35 @@ public final class LicenseUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LicenseUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows" - + " Server 2012" - + " R2\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":1139572680}},\"tags\":{\"eitjz\":\"jddeqsrdeupewnw\",\"qhsmyurkdtml\":\"flusarhmof\"}}") - .toObject(LicenseUpdate.class); - Assertions.assertEquals("jddeqsrdeupewnw", model.tags().get("eitjz")); + LicenseUpdate model = BinaryData.fromString( + "{\"properties\":{\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows Server 2012 R2\",\"edition\":\"Datacenter\",\"type\":\"pCore\",\"processors\":441101019}},\"tags\":{\"bshrnsvbuswd\":\"pdso\",\"ybycnunvj\":\"z\"}}") + .toObject(LicenseUpdate.class); + Assertions.assertEquals("pdso", model.tags().get("bshrnsvbuswd")); Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); + Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.target()); Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(1139572680, model.processors()); + Assertions.assertEquals(441101019, model.processors()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LicenseUpdate model = - new LicenseUpdate() - .withTags(mapOf("eitjz", "jddeqsrdeupewnw", "qhsmyurkdtml", "flusarhmof")) - .withLicenseType(LicenseType.ESU) - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(1139572680); + LicenseUpdate model = new LicenseUpdate().withTags(mapOf("bshrnsvbuswd", "pdso", "ybycnunvj", "z")) + .withLicenseType(LicenseType.ESU) + .withState(LicenseState.DEACTIVATED) + .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) + .withEdition(LicenseEdition.DATACENTER) + .withType(LicenseCoreType.P_CORE) + .withProcessors(441101019); model = BinaryData.fromObject(model).toObject(LicenseUpdate.class); - Assertions.assertEquals("jddeqsrdeupewnw", model.tags().get("eitjz")); + Assertions.assertEquals("pdso", model.tags().get("bshrnsvbuswd")); Assertions.assertEquals(LicenseType.ESU, model.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.state()); + Assertions.assertEquals(LicenseState.DEACTIVATED, model.state()); Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, model.target()); Assertions.assertEquals(LicenseEdition.DATACENTER, model.edition()); Assertions.assertEquals(LicenseCoreType.P_CORE, model.type()); - Assertions.assertEquals(1139572680, model.processors()); + Assertions.assertEquals(441101019, model.processors()); } // Use "Map.of" if available 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 deleted file mode 100644 index b69e7628d670..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hybridcompute.HybridComputeManager; -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LicensesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"ih\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Deactivated\",\"target\":\"Windows" - + " Server" - + " 2012\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":479355012,\"assignedLicenses\":315596091,\"immutableId\":\"jv\"}},\"location\":\"imwkslircizj\",\"tags\":{\"vlhv\":\"dfcea\",\"jslb\":\"gdyftumrtwna\"},\"id\":\"wkojgcyztsfmzn\",\"name\":\"aeqphchqnr\",\"type\":\"rpxeh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - License response = - manager - .licenses() - .define("vp") - .withRegion("tpipiwyczuhx") - .withExistingResourceGroup("rujbzbomvzzbtdc") - .withTags(mapOf("dvlmfwdgzxul", "qjlihhyuspska", "rsre", "cvpa", "xifqjzgxm", "zvxurisjnhny")) - .withTenantId("viylwdshfssnrbgy") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails( - new LicenseDetails() - .withState(LicenseState.DEACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.STANDARD) - .withType(LicenseCoreType.P_CORE) - .withProcessors(326840480)) - .create(); - - Assertions.assertEquals("imwkslircizj", response.location()); - Assertions.assertEquals("dfcea", response.tags().get("vlhv")); - Assertions.assertEquals("ih", 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(479355012, response.licenseDetails().processors()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteMockTests.java deleted file mode 100644 index 2a9f8321ac5e..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hybridcompute.HybridComputeManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LicensesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.licenses().delete("iufxqknpir", "nepttwqmsni", 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 deleted file mode 100644 index cae57bc8e71f..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hybridcompute.HybridComputeManager; -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LicensesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Failed\",\"tenantId\":\"pncur\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows" - + " Server 2012" - + " R2\",\"edition\":\"Standard\",\"type\":\"pCore\",\"processors\":1466459543,\"assignedLicenses\":709721668,\"immutableId\":\"h\"}},\"location\":\"knfd\",\"tags\":{\"ton\":\"jchrdgoihxumw\",\"uu\":\"zj\"},\"id\":\"fdlwg\",\"name\":\"ytsbwtovv\",\"type\":\"gseinq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - License response = - manager - .licenses() - .getByResourceGroupWithResponse("xyfwnylrcool", "ttpkiwkkbnujrywv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("knfd", response.location()); - Assertions.assertEquals("jchrdgoihxumw", response.tags().get("ton")); - Assertions.assertEquals("pncur", response.tenantId()); - Assertions.assertEquals(LicenseType.ESU, response.licenseType()); - 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.P_CORE, response.licenseDetails().type()); - Assertions.assertEquals(1466459543, response.licenseDetails().processors()); - } -} 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 deleted file mode 100644 index da72c4509608..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListByResourceGroupMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hybridcompute.HybridComputeManager; -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LicensesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"tenantId\":\"ddhcratizzr\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows" - + " Server 2012" - + " R2\",\"edition\":\"Standard\",\"type\":\"vCore\",\"processors\":74306570,\"assignedLicenses\":441985867,\"immutableId\":\"esgogc\"}},\"location\":\"onnxkrlgnyhm\",\"tags\":{\"thrrgh\":\"xkk\",\"gf\":\"jbdhqxvc\"},\"id\":\"pdso\",\"name\":\"bshrnsvbuswd\",\"type\":\"z\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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.licenses().listByResourceGroup("fcdmqnrojlpijn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("onnxkrlgnyhm", response.iterator().next().location()); - Assertions.assertEquals("xkk", response.iterator().next().tags().get("thrrgh")); - Assertions.assertEquals("ddhcratizzr", response.iterator().next().tenantId()); - Assertions.assertEquals(LicenseType.ESU, response.iterator().next().licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, response.iterator().next().licenseDetails().state()); - Assertions - .assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, 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(74306570, response.iterator().next().licenseDetails().processors()); - } -} 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 deleted file mode 100644 index 96a661526bff..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hybridcompute.HybridComputeManager; -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LicensesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"tenantId\":\"nu\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows" - + " Server" - + " 2012\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":406416899,\"assignedLicenses\":286586913,\"immutableId\":\"yzirtxdyuxzejn\"}},\"location\":\"sewgioilqukr\",\"tags\":{\"rgguf\":\"tqmieox\",\"hhavgrvkffovjz\":\"yaomtb\",\"gjmfxumvfcl\":\"pjbi\"},\"id\":\"yo\",\"name\":\"wxnb\",\"type\":\"fezzxscyhwzdg\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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.licenses().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("sewgioilqukr", response.iterator().next().location()); - Assertions.assertEquals("tqmieox", response.iterator().next().tags().get("rgguf")); - Assertions.assertEquals("nu", response.iterator().next().tenantId()); - Assertions.assertEquals(LicenseType.ESU, response.iterator().next().licenseType()); - 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.V_CORE, response.iterator().next().licenseDetails().type()); - Assertions.assertEquals(406416899, response.iterator().next().licenseDetails().processors()); - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListResultTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListResultTests.java deleted file mode 100644 index a2b0f5892a54..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesListResultTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import com.azure.resourcemanager.hybridcompute.models.LicensesListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class LicensesListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LicensesListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"yrtih\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows" - + " Server" - + " 2012\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":706884387,\"assignedLicenses\":2084129316,\"immutableId\":\"lzufcyzkohdbi\"}},\"location\":\"nufhf\",\"tags\":{\"a\":\"y\",\"xwczbyscnp\":\"ithxqhabifpi\"},\"id\":\"x\",\"name\":\"hiv\",\"type\":\"qniwbybrkxvdumj\"}],\"nextLink\":\"tfwvukxgaudc\"}") - .toObject(LicensesListResult.class); - Assertions.assertEquals("nufhf", model.value().get(0).location()); - Assertions.assertEquals("y", model.value().get(0).tags().get("a")); - Assertions.assertEquals("yrtih", model.value().get(0).tenantId()); - Assertions.assertEquals(LicenseType.ESU, model.value().get(0).licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.value().get(0).licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.value().get(0).licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.value().get(0).licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, model.value().get(0).licenseDetails().type()); - Assertions.assertEquals(706884387, model.value().get(0).licenseDetails().processors()); - Assertions.assertEquals("tfwvukxgaudc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LicensesListResult model = - new LicensesListResult() - .withValue( - Arrays - .asList( - new LicenseInner() - .withLocation("nufhf") - .withTags(mapOf("a", "y", "xwczbyscnp", "ithxqhabifpi")) - .withTenantId("yrtih") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails( - new LicenseDetails() - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.V_CORE) - .withProcessors(706884387)))) - .withNextLink("tfwvukxgaudc"); - model = BinaryData.fromObject(model).toObject(LicensesListResult.class); - Assertions.assertEquals("nufhf", model.value().get(0).location()); - Assertions.assertEquals("y", model.value().get(0).tags().get("a")); - Assertions.assertEquals("yrtih", model.value().get(0).tenantId()); - Assertions.assertEquals(LicenseType.ESU, model.value().get(0).licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, model.value().get(0).licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012, model.value().get(0).licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, model.value().get(0).licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, model.value().get(0).licenseDetails().type()); - Assertions.assertEquals(706884387, model.value().get(0).licenseDetails().processors()); - Assertions.assertEquals("tfwvukxgaudc", 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/LicensesValidateLicenseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseMockTests.java deleted file mode 100644 index 1ab733abdadd..000000000000 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LicensesValidateLicenseMockTests.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hybridcompute.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hybridcompute.HybridComputeManager; -import com.azure.resourcemanager.hybridcompute.fluent.models.LicenseInner; -import com.azure.resourcemanager.hybridcompute.models.License; -import com.azure.resourcemanager.hybridcompute.models.LicenseCoreType; -import com.azure.resourcemanager.hybridcompute.models.LicenseDetails; -import com.azure.resourcemanager.hybridcompute.models.LicenseEdition; -import com.azure.resourcemanager.hybridcompute.models.LicenseState; -import com.azure.resourcemanager.hybridcompute.models.LicenseTarget; -import com.azure.resourcemanager.hybridcompute.models.LicenseType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LicensesValidateLicenseMockTests { - @Test - public void testValidateLicense() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"tenantId\":\"jlwuenvrkp\",\"licenseType\":\"ESU\",\"licenseDetails\":{\"state\":\"Activated\",\"target\":\"Windows" - + " Server 2012" - + " R2\",\"edition\":\"Datacenter\",\"type\":\"vCore\",\"processors\":360748020,\"assignedLicenses\":206948970,\"immutableId\":\"xqtnq\"}},\"location\":\"ezl\",\"tags\":{\"edltmmjihyeozp\":\"fiakpjpqqm\",\"qncygupkvi\":\"vwau\"},\"id\":\"mdscwxqupev\",\"name\":\"hfstotxhojujbyp\",\"type\":\"lmcuvhixb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - License response = - manager - .licenses() - .validateLicense( - new LicenseInner() - .withLocation("gumhjglikkxws") - .withTags(mapOf("vuzlm", "bq", "lcrpw", "felfktg", "brnjwmw", "xeznoi", "saz", "pn")) - .withTenantId("y") - .withLicenseType(LicenseType.ESU) - .withLicenseDetails( - new LicenseDetails() - .withState(LicenseState.ACTIVATED) - .withTarget(LicenseTarget.WINDOWS_SERVER_2012_R2) - .withEdition(LicenseEdition.DATACENTER) - .withType(LicenseCoreType.P_CORE) - .withProcessors(779429709)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ezl", response.location()); - Assertions.assertEquals("fiakpjpqqm", response.tags().get("edltmmjihyeozp")); - Assertions.assertEquals("jlwuenvrkp", response.tenantId()); - Assertions.assertEquals(LicenseType.ESU, response.licenseType()); - Assertions.assertEquals(LicenseState.ACTIVATED, response.licenseDetails().state()); - Assertions.assertEquals(LicenseTarget.WINDOWS_SERVER_2012_R2, response.licenseDetails().target()); - Assertions.assertEquals(LicenseEdition.DATACENTER, response.licenseDetails().edition()); - Assertions.assertEquals(LicenseCoreType.V_CORE, response.licenseDetails().type()); - Assertions.assertEquals(360748020, response.licenseDetails().processors()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LinuxParametersTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/LinuxParametersTests.java index fccdfdb6e513..71af2a0c5b87 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 @@ -13,31 +13,23 @@ public final class LinuxParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LinuxParameters model = - BinaryData - .fromString( - "{\"classificationsToInclude\":[\"Other\",\"Other\",\"Security\"],\"packageNameMasksToInclude\":[\"bfs\"],\"packageNameMasksToExclude\":[\"butr\"]}") - .toObject(LinuxParameters.class); + LinuxParameters model = BinaryData.fromString( + "{\"classificationsToInclude\":[\"Other\"],\"packageNameMasksToInclude\":[\"ukkfplgmgs\",\"nkjzkdeslpvlop\"],\"packageNameMasksToExclude\":[\"ighxpk\",\"wzbaiue\"]}") + .toObject(LinuxParameters.class); Assertions.assertEquals(VMGuestPatchClassificationLinux.OTHER, model.classificationsToInclude().get(0)); - Assertions.assertEquals("bfs", model.packageNameMasksToInclude().get(0)); - Assertions.assertEquals("butr", model.packageNameMasksToExclude().get(0)); + Assertions.assertEquals("ukkfplgmgs", model.packageNameMasksToInclude().get(0)); + Assertions.assertEquals("ighxpk", model.packageNameMasksToExclude().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LinuxParameters model = - new LinuxParameters() - .withClassificationsToInclude( - Arrays - .asList( - VMGuestPatchClassificationLinux.OTHER, - VMGuestPatchClassificationLinux.OTHER, - VMGuestPatchClassificationLinux.SECURITY)) - .withPackageNameMasksToInclude(Arrays.asList("bfs")) - .withPackageNameMasksToExclude(Arrays.asList("butr")); + LinuxParameters model + = new LinuxParameters().withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationLinux.OTHER)) + .withPackageNameMasksToInclude(Arrays.asList("ukkfplgmgs", "nkjzkdeslpvlop")) + .withPackageNameMasksToExclude(Arrays.asList("ighxpk", "wzbaiue")); model = BinaryData.fromObject(model).toObject(LinuxParameters.class); Assertions.assertEquals(VMGuestPatchClassificationLinux.OTHER, model.classificationsToInclude().get(0)); - Assertions.assertEquals("bfs", model.packageNameMasksToInclude().get(0)); - Assertions.assertEquals("butr", model.packageNameMasksToExclude().get(0)); + Assertions.assertEquals("ukkfplgmgs", model.packageNameMasksToInclude().get(0)); + Assertions.assertEquals("ighxpk", 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 a1081d7aceb3..fadc6eed0c88 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,29 +11,25 @@ public final class LocationDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - LocationData model = - BinaryData - .fromString( - "{\"name\":\"oodqxhcrm\",\"city\":\"hjtckwhd\",\"district\":\"ifiyipjxsqwpgrj\",\"countryOrRegion\":\"norcjxvsnbyxqab\"}") - .toObject(LocationData.class); - Assertions.assertEquals("oodqxhcrm", model.name()); - Assertions.assertEquals("hjtckwhd", model.city()); - Assertions.assertEquals("ifiyipjxsqwpgrj", model.district()); - Assertions.assertEquals("norcjxvsnbyxqab", model.countryOrRegion()); + LocationData model = BinaryData.fromString( + "{\"name\":\"zdatqxhocdg\",\"city\":\"blgphuticn\",\"district\":\"kao\",\"countryOrRegion\":\"yiftyhxhuro\"}") + .toObject(LocationData.class); + Assertions.assertEquals("zdatqxhocdg", model.name()); + Assertions.assertEquals("blgphuticn", model.city()); + Assertions.assertEquals("kao", model.district()); + Assertions.assertEquals("yiftyhxhuro", model.countryOrRegion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - LocationData model = - new LocationData() - .withName("oodqxhcrm") - .withCity("hjtckwhd") - .withDistrict("ifiyipjxsqwpgrj") - .withCountryOrRegion("norcjxvsnbyxqab"); + LocationData model = new LocationData().withName("zdatqxhocdg") + .withCity("blgphuticn") + .withDistrict("kao") + .withCountryOrRegion("yiftyhxhuro"); model = BinaryData.fromObject(model).toObject(LocationData.class); - Assertions.assertEquals("oodqxhcrm", model.name()); - Assertions.assertEquals("hjtckwhd", model.city()); - Assertions.assertEquals("ifiyipjxsqwpgrj", model.district()); - Assertions.assertEquals("norcjxvsnbyxqab", model.countryOrRegion()); + Assertions.assertEquals("zdatqxhocdg", model.name()); + Assertions.assertEquals("blgphuticn", model.city()); + Assertions.assertEquals("kao", model.district()); + Assertions.assertEquals("yiftyhxhuro", model.countryOrRegion()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineAssessPatchesResultInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineAssessPatchesResultInnerTests.java index 6fe66f2fd0c8..ed0f464ee64d 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineAssessPatchesResultInnerTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineAssessPatchesResultInnerTests.java @@ -11,18 +11,15 @@ public final class MachineAssessPatchesResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MachineAssessPatchesResultInner model = - BinaryData - .fromString( - "{\"status\":\"Unknown\",\"assessmentActivityId\":\"nmmqhgyxzkon\",\"rebootPending\":false,\"availablePatchCountByClassification\":{\"security\":470359400,\"critical\":1536043390,\"definition\":1474551833,\"updateRollup\":1609170177,\"featurePack\":489125368,\"servicePack\":809067988,\"tools\":447504444,\"updates\":1399923471,\"other\":731084227},\"startDateTime\":\"2021-01-29T23:28:32Z\",\"lastModifiedDateTime\":\"2021-03-31T17:10:24Z\",\"startedBy\":\"Platform\",\"patchServiceUsed\":\"WU\",\"osType\":\"Linux\"}") - .toObject(MachineAssessPatchesResultInner.class); + MachineAssessPatchesResultInner model = BinaryData.fromString( + "{\"status\":\"Succeeded\",\"assessmentActivityId\":\"d70b08f6-72ae-4da0-af2b-cc9bd6993b93\",\"rebootPending\":true,\"availablePatchCountByClassification\":{\"security\":1474388654,\"critical\":307935551,\"definition\":1850668583,\"updateRollup\":1795094625,\"featurePack\":734884561,\"servicePack\":1438226066,\"tools\":1074926668,\"updates\":1326044907,\"other\":679470188},\"startDateTime\":\"2021-02-18T02:28:33Z\",\"lastModifiedDateTime\":\"2021-03-19T14:15:42Z\",\"startedBy\":\"User\",\"patchServiceUsed\":\"WU\",\"osType\":\"Windows\"}") + .toObject(MachineAssessPatchesResultInner.class); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineAssessPatchesResultInner model = - new MachineAssessPatchesResultInner() - .withAvailablePatchCountByClassification(new AvailablePatchCountByClassification()); + MachineAssessPatchesResultInner model = new MachineAssessPatchesResultInner() + .withAvailablePatchCountByClassification(new AvailablePatchCountByClassification()); model = BinaryData.fromObject(model).toObject(MachineAssessPatchesResultInner.class); } } 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 91aaabb2d5d7..840e8cb3565e 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 @@ -13,36 +13,34 @@ public final class MachineExtensionUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MachineExtensionUpdateProperties model = - BinaryData - .fromString( - "{\"forceUpdateTag\":\"eyvjusrtslhspkde\",\"publisher\":\"aofmxagkvtme\",\"type\":\"qkrhahvljua\",\"typeHandlerVersion\":\"quhcdhmduala\",\"enableAutomaticUpgrade\":false,\"autoUpgradeMinorVersion\":false,\"settings\":{\"fmisg\":\"datadmwsrcrgvxpvgomz\"},\"protectedSettings\":{\"e\":\"datab\",\"urqhaka\":\"datadawkzbali\"}}") - .toObject(MachineExtensionUpdateProperties.class); - Assertions.assertEquals("eyvjusrtslhspkde", model.forceUpdateTag()); - Assertions.assertEquals("aofmxagkvtme", model.publisher()); - Assertions.assertEquals("qkrhahvljua", model.type()); - Assertions.assertEquals("quhcdhmduala", model.typeHandlerVersion()); + MachineExtensionUpdateProperties model = BinaryData.fromString( + "{\"forceUpdateTag\":\"gibtnm\",\"publisher\":\"ebwwaloayqc\",\"type\":\"rtzju\",\"typeHandlerVersion\":\"wyzmhtxon\",\"enableAutomaticUpgrade\":false,\"autoUpgradeMinorVersion\":false,\"settings\":{\"uvriuhprwm\":\"datacbpwxqpsrknft\",\"bexrmcq\":\"datayvxqtayriwwroy\",\"e\":\"databycnojvkn\",\"zhpvgqzcjrvxd\":\"dataqsgzvahapj\"},\"protectedSettings\":{\"ug\":\"datamwlxk\",\"nnprn\":\"datahzovawjvzunlut\",\"eilpjzuaejxdu\":\"datai\",\"pwo\":\"datatskzbbtdzumveek\"}}") + .toObject(MachineExtensionUpdateProperties.class); + Assertions.assertEquals("gibtnm", model.forceUpdateTag()); + Assertions.assertEquals("ebwwaloayqc", model.publisher()); + Assertions.assertEquals("rtzju", model.type()); + Assertions.assertEquals("wyzmhtxon", model.typeHandlerVersion()); Assertions.assertEquals(false, model.enableAutomaticUpgrade()); Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineExtensionUpdateProperties model = - new MachineExtensionUpdateProperties() - .withForceUpdateTag("eyvjusrtslhspkde") - .withPublisher("aofmxagkvtme") - .withType("qkrhahvljua") - .withTypeHandlerVersion("quhcdhmduala") - .withEnableAutomaticUpgrade(false) - .withAutoUpgradeMinorVersion(false) - .withSettings(mapOf("fmisg", "datadmwsrcrgvxpvgomz")) - .withProtectedSettings(mapOf("e", "datab", "urqhaka", "datadawkzbali")); + MachineExtensionUpdateProperties model = new MachineExtensionUpdateProperties().withForceUpdateTag("gibtnm") + .withPublisher("ebwwaloayqc") + .withType("rtzju") + .withTypeHandlerVersion("wyzmhtxon") + .withEnableAutomaticUpgrade(false) + .withAutoUpgradeMinorVersion(false) + .withSettings(mapOf("uvriuhprwm", "datacbpwxqpsrknft", "bexrmcq", "datayvxqtayriwwroy", "e", + "databycnojvkn", "zhpvgqzcjrvxd", "dataqsgzvahapj")) + .withProtectedSettings(mapOf("ug", "datamwlxk", "nnprn", "datahzovawjvzunlut", "eilpjzuaejxdu", "datai", + "pwo", "datatskzbbtdzumveek")); model = BinaryData.fromObject(model).toObject(MachineExtensionUpdateProperties.class); - Assertions.assertEquals("eyvjusrtslhspkde", model.forceUpdateTag()); - Assertions.assertEquals("aofmxagkvtme", model.publisher()); - Assertions.assertEquals("qkrhahvljua", model.type()); - Assertions.assertEquals("quhcdhmduala", model.typeHandlerVersion()); + Assertions.assertEquals("gibtnm", model.forceUpdateTag()); + Assertions.assertEquals("ebwwaloayqc", model.publisher()); + Assertions.assertEquals("rtzju", model.type()); + Assertions.assertEquals("wyzmhtxon", 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/MachineExtensionUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineExtensionUpdateTests.java index 2e568a9708e1..a899f2fe6eae 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 @@ -13,50 +13,38 @@ public final class MachineExtensionUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MachineExtensionUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"forceUpdateTag\":\"ceoveilovno\",\"publisher\":\"fj\",\"type\":\"njbkcnxdhbttkph\",\"typeHandlerVersion\":\"pnvjtoqnermclf\",\"enableAutomaticUpgrade\":false,\"autoUpgradeMinorVersion\":true,\"settings\":{\"zq\":\"datascrpabgyepsbjt\",\"fjz\":\"datagxywpmue\",\"dsuyonobgla\":\"datafqkquj\",\"tcc\":\"datacq\"},\"protectedSettings\":{\"wfudwpzntxhdzhl\":\"dataudxytlmoyrx\",\"hckfrlhrx\":\"dataqj\",\"ca\":\"databkyvp\"}},\"tags\":{\"nwbmeh\":\"bpzkafkuwbc\"}}") - .toObject(MachineExtensionUpdate.class); - Assertions.assertEquals("bpzkafkuwbc", model.tags().get("nwbmeh")); - Assertions.assertEquals("ceoveilovno", model.forceUpdateTag()); - Assertions.assertEquals("fj", model.publisher()); - Assertions.assertEquals("njbkcnxdhbttkph", model.type()); - Assertions.assertEquals("pnvjtoqnermclf", model.typeHandlerVersion()); - Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + MachineExtensionUpdate model = BinaryData.fromString( + "{\"properties\":{\"forceUpdateTag\":\"misgwbnb\",\"publisher\":\"ldawkzbaliourqha\",\"type\":\"uhashsfwx\",\"typeHandlerVersion\":\"owzxcu\",\"enableAutomaticUpgrade\":true,\"autoUpgradeMinorVersion\":true,\"settings\":{\"pucwwfvovbvme\":\"datadjeb\"},\"protectedSettings\":{\"iotwmcdytdxwit\":\"dataivyhzceuojgjrwju\",\"hniskxfbkpyc\":\"datanrjawgqwg\",\"l\":\"dataklwndnhjdauwhv\"}},\"tags\":{\"zqlveualupjmkhf\":\"tdhxujznbmpowuwp\",\"wsrtjriplrbpbe\":\"obbc\",\"qhjk\":\"tghfgblcgwxzvl\"}}") + .toObject(MachineExtensionUpdate.class); + Assertions.assertEquals("tdhxujznbmpowuwp", model.tags().get("zqlveualupjmkhf")); + Assertions.assertEquals("misgwbnb", model.forceUpdateTag()); + Assertions.assertEquals("ldawkzbaliourqha", model.publisher()); + Assertions.assertEquals("uhashsfwx", model.type()); + Assertions.assertEquals("owzxcu", model.typeHandlerVersion()); + Assertions.assertEquals(true, model.enableAutomaticUpgrade()); Assertions.assertEquals(true, model.autoUpgradeMinorVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineExtensionUpdate model = - new MachineExtensionUpdate() - .withTags(mapOf("nwbmeh", "bpzkafkuwbc")) - .withForceUpdateTag("ceoveilovno") - .withPublisher("fj") - .withType("njbkcnxdhbttkph") - .withTypeHandlerVersion("pnvjtoqnermclf") - .withEnableAutomaticUpgrade(false) - .withAutoUpgradeMinorVersion(true) - .withSettings( - mapOf( - "zq", - "datascrpabgyepsbjt", - "fjz", - "datagxywpmue", - "dsuyonobgla", - "datafqkquj", - "tcc", - "datacq")) - .withProtectedSettings( - mapOf("wfudwpzntxhdzhl", "dataudxytlmoyrx", "hckfrlhrx", "dataqj", "ca", "databkyvp")); + MachineExtensionUpdate model = new MachineExtensionUpdate() + .withTags(mapOf("zqlveualupjmkhf", "tdhxujznbmpowuwp", "wsrtjriplrbpbe", "obbc", "qhjk", "tghfgblcgwxzvl")) + .withForceUpdateTag("misgwbnb") + .withPublisher("ldawkzbaliourqha") + .withType("uhashsfwx") + .withTypeHandlerVersion("owzxcu") + .withEnableAutomaticUpgrade(true) + .withAutoUpgradeMinorVersion(true) + .withSettings(mapOf("pucwwfvovbvme", "datadjeb")) + .withProtectedSettings(mapOf("iotwmcdytdxwit", "dataivyhzceuojgjrwju", "hniskxfbkpyc", "datanrjawgqwg", "l", + "dataklwndnhjdauwhv")); model = BinaryData.fromObject(model).toObject(MachineExtensionUpdate.class); - Assertions.assertEquals("bpzkafkuwbc", model.tags().get("nwbmeh")); - Assertions.assertEquals("ceoveilovno", model.forceUpdateTag()); - Assertions.assertEquals("fj", model.publisher()); - Assertions.assertEquals("njbkcnxdhbttkph", model.type()); - Assertions.assertEquals("pnvjtoqnermclf", model.typeHandlerVersion()); - Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertEquals("tdhxujznbmpowuwp", model.tags().get("zqlveualupjmkhf")); + Assertions.assertEquals("misgwbnb", model.forceUpdateTag()); + Assertions.assertEquals("ldawkzbaliourqha", model.publisher()); + Assertions.assertEquals("uhashsfwx", model.type()); + Assertions.assertEquals("owzxcu", model.typeHandlerVersion()); + Assertions.assertEquals(true, model.enableAutomaticUpgrade()); Assertions.assertEquals(true, 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 fa6634a2123c..793bc93cb878 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,30 +14,18 @@ public final class MachineExtensionUpgradeTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MachineExtensionUpgrade model = - BinaryData - .fromString( - "{\"extensionTargets\":{\"zg\":{\"targetVersion\":\"j\"},\"xongmtsavjcbpwxq\":{\"targetVersion\":\"zmh\"},\"yvxqtayriwwroy\":{\"targetVersion\":\"rknftguvriuhprwm\"},\"mefqsgzvahapjyzh\":{\"targetVersion\":\"exrmcqibycnojvk\"}}}") + MachineExtensionUpgrade model + = BinaryData.fromString("{\"extensionTargets\":{\"qaqtdoqmcbxvwvxy\":{\"targetVersion\":\"t\"}}}") .toObject(MachineExtensionUpgrade.class); - Assertions.assertEquals("j", model.extensionTargets().get("zg").targetVersion()); + Assertions.assertEquals("t", model.extensionTargets().get("qaqtdoqmcbxvwvxy").targetVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineExtensionUpgrade model = - new MachineExtensionUpgrade() - .withExtensionTargets( - mapOf( - "zg", - new ExtensionTargetProperties().withTargetVersion("j"), - "xongmtsavjcbpwxq", - new ExtensionTargetProperties().withTargetVersion("zmh"), - "yvxqtayriwwroy", - new ExtensionTargetProperties().withTargetVersion("rknftguvriuhprwm"), - "mefqsgzvahapjyzh", - new ExtensionTargetProperties().withTargetVersion("exrmcqibycnojvk"))); + MachineExtensionUpgrade model = new MachineExtensionUpgrade() + .withExtensionTargets(mapOf("qaqtdoqmcbxvwvxy", new ExtensionTargetProperties().withTargetVersion("t"))); model = BinaryData.fromObject(model).toObject(MachineExtensionUpgrade.class); - Assertions.assertEquals("j", model.extensionTargets().get("zg").targetVersion()); + Assertions.assertEquals("t", model.extensionTargets().get("qaqtdoqmcbxvwvxy").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 9cad96aaef3e..7298cd2ccbb2 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 @@ -6,58 +6,28 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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 java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MachineExtensionsDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + manager.machineExtensions().delete("ffwafq", "oudaspavehhrvk", "unzo", com.azure.core.util.Context.NONE); - manager - .machineExtensions() - .delete("esmi", "knlrariaawiuagy", "wqfbylyrfgiagt", 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 98fc55f71588..a752579712f9 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 @@ -11,6 +11,7 @@ import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationWindows; import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchRebootSetting; import com.azure.resourcemanager.hybridcompute.models.WindowsParameters; +import java.time.Duration; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -18,75 +19,54 @@ public final class MachineInstallPatchesParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MachineInstallPatchesParameters model = - BinaryData - .fromString( - "{\"maximumDuration\":\"pwvlqdq\",\"rebootSetting\":\"Never\",\"windowsParameters\":{\"classificationsToInclude\":[\"Tools\",\"Definition\",\"Definition\"],\"kbNumbersToInclude\":[\"etcktvfcivfsnk\",\"m\",\"ctq\",\"jf\"],\"kbNumbersToExclude\":[\"rjcxerfuwu\",\"ttxfvjr\"],\"excludeKbsRequiringReboot\":false,\"maxPatchPublishDate\":\"2020-12-24T00:10:53Z\"},\"linuxParameters\":{\"classificationsToInclude\":[\"Security\",\"Other\",\"Security\",\"Critical\"],\"packageNameMasksToInclude\":[\"nljky\",\"xjvuujqgidokg\"],\"packageNameMasksToExclude\":[\"yoxgvcltbgsnc\",\"hkjeszzhbi\",\"htxfvgxbfsmxnehm\"]}}") - .toObject(MachineInstallPatchesParameters.class); - Assertions.assertEquals("pwvlqdq", model.maximumDuration()); - Assertions.assertEquals(VMGuestPatchRebootSetting.NEVER, model.rebootSetting()); - Assertions - .assertEquals( - VMGuestPatchClassificationWindows.TOOLS, model.windowsParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("etcktvfcivfsnk", model.windowsParameters().kbNumbersToInclude().get(0)); - Assertions.assertEquals("rjcxerfuwu", model.windowsParameters().kbNumbersToExclude().get(0)); + MachineInstallPatchesParameters model = BinaryData.fromString( + "{\"maximumDuration\":\"PT56H48M27S\",\"rebootSetting\":\"IfRequired\",\"windowsParameters\":{\"classificationsToInclude\":[\"Security\",\"Tools\",\"Updates\"],\"kbNumbersToInclude\":[\"fkts\",\"hsucoc\"],\"kbNumbersToExclude\":[\"yazttbtwwrqpue\",\"ckzywbiexzfeyue\"],\"excludeKbsRequiringReboot\":false,\"maxPatchPublishDate\":\"2021-05-01T16:37:43Z\"},\"linuxParameters\":{\"classificationsToInclude\":[\"Other\",\"Critical\"],\"packageNameMasksToInclude\":[\"almuzyoxaepdkzja\"],\"packageNameMasksToExclude\":[\"xrhdwbavxbniwdjs\"]}}") + .toObject(MachineInstallPatchesParameters.class); + Assertions.assertEquals(Duration.parse("PT56H48M27S"), model.maximumDuration()); + Assertions.assertEquals(VMGuestPatchRebootSetting.IF_REQUIRED, model.rebootSetting()); + Assertions.assertEquals(VMGuestPatchClassificationWindows.SECURITY, + model.windowsParameters().classificationsToInclude().get(0)); + Assertions.assertEquals("fkts", model.windowsParameters().kbNumbersToInclude().get(0)); + Assertions.assertEquals("yazttbtwwrqpue", model.windowsParameters().kbNumbersToExclude().get(0)); Assertions.assertEquals(false, model.windowsParameters().excludeKbsRequiringReboot()); - Assertions - .assertEquals( - OffsetDateTime.parse("2020-12-24T00:10:53Z"), model.windowsParameters().maxPatchPublishDate()); - Assertions - .assertEquals( - VMGuestPatchClassificationLinux.SECURITY, model.linuxParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("nljky", model.linuxParameters().packageNameMasksToInclude().get(0)); - Assertions.assertEquals("yoxgvcltbgsnc", model.linuxParameters().packageNameMasksToExclude().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T16:37:43Z"), + model.windowsParameters().maxPatchPublishDate()); + Assertions.assertEquals(VMGuestPatchClassificationLinux.OTHER, + model.linuxParameters().classificationsToInclude().get(0)); + Assertions.assertEquals("almuzyoxaepdkzja", model.linuxParameters().packageNameMasksToInclude().get(0)); + Assertions.assertEquals("xrhdwbavxbniwdjs", model.linuxParameters().packageNameMasksToExclude().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineInstallPatchesParameters model = - new MachineInstallPatchesParameters() - .withMaximumDuration("pwvlqdq") - .withRebootSetting(VMGuestPatchRebootSetting.NEVER) - .withWindowsParameters( - new WindowsParameters() - .withClassificationsToInclude( - Arrays - .asList( - VMGuestPatchClassificationWindows.TOOLS, - VMGuestPatchClassificationWindows.DEFINITION, - VMGuestPatchClassificationWindows.DEFINITION)) - .withKbNumbersToInclude(Arrays.asList("etcktvfcivfsnk", "m", "ctq", "jf")) - .withKbNumbersToExclude(Arrays.asList("rjcxerfuwu", "ttxfvjr")) - .withExcludeKbsRequiringReboot(false) - .withMaxPatchPublishDate(OffsetDateTime.parse("2020-12-24T00:10:53Z"))) - .withLinuxParameters( - new LinuxParameters() - .withClassificationsToInclude( - Arrays - .asList( - VMGuestPatchClassificationLinux.SECURITY, - VMGuestPatchClassificationLinux.OTHER, - VMGuestPatchClassificationLinux.SECURITY, - VMGuestPatchClassificationLinux.CRITICAL)) - .withPackageNameMasksToInclude(Arrays.asList("nljky", "xjvuujqgidokg")) - .withPackageNameMasksToExclude( - Arrays.asList("yoxgvcltbgsnc", "hkjeszzhbi", "htxfvgxbfsmxnehm"))); + MachineInstallPatchesParameters model + = new MachineInstallPatchesParameters().withMaximumDuration(Duration.parse("PT56H48M27S")) + .withRebootSetting(VMGuestPatchRebootSetting.IF_REQUIRED) + .withWindowsParameters(new WindowsParameters() + .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.SECURITY, + VMGuestPatchClassificationWindows.TOOLS, VMGuestPatchClassificationWindows.UPDATES)) + .withKbNumbersToInclude(Arrays.asList("fkts", "hsucoc")) + .withKbNumbersToExclude(Arrays.asList("yazttbtwwrqpue", "ckzywbiexzfeyue")) + .withExcludeKbsRequiringReboot(false) + .withMaxPatchPublishDate(OffsetDateTime.parse("2021-05-01T16:37:43Z"))) + .withLinuxParameters(new LinuxParameters() + .withClassificationsToInclude( + Arrays.asList(VMGuestPatchClassificationLinux.OTHER, VMGuestPatchClassificationLinux.CRITICAL)) + .withPackageNameMasksToInclude(Arrays.asList("almuzyoxaepdkzja")) + .withPackageNameMasksToExclude(Arrays.asList("xrhdwbavxbniwdjs"))); model = BinaryData.fromObject(model).toObject(MachineInstallPatchesParameters.class); - Assertions.assertEquals("pwvlqdq", model.maximumDuration()); - Assertions.assertEquals(VMGuestPatchRebootSetting.NEVER, model.rebootSetting()); - Assertions - .assertEquals( - VMGuestPatchClassificationWindows.TOOLS, model.windowsParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("etcktvfcivfsnk", model.windowsParameters().kbNumbersToInclude().get(0)); - Assertions.assertEquals("rjcxerfuwu", model.windowsParameters().kbNumbersToExclude().get(0)); + Assertions.assertEquals(Duration.parse("PT56H48M27S"), model.maximumDuration()); + Assertions.assertEquals(VMGuestPatchRebootSetting.IF_REQUIRED, model.rebootSetting()); + Assertions.assertEquals(VMGuestPatchClassificationWindows.SECURITY, + model.windowsParameters().classificationsToInclude().get(0)); + Assertions.assertEquals("fkts", model.windowsParameters().kbNumbersToInclude().get(0)); + Assertions.assertEquals("yazttbtwwrqpue", model.windowsParameters().kbNumbersToExclude().get(0)); Assertions.assertEquals(false, model.windowsParameters().excludeKbsRequiringReboot()); - Assertions - .assertEquals( - OffsetDateTime.parse("2020-12-24T00:10:53Z"), model.windowsParameters().maxPatchPublishDate()); - Assertions - .assertEquals( - VMGuestPatchClassificationLinux.SECURITY, model.linuxParameters().classificationsToInclude().get(0)); - Assertions.assertEquals("nljky", model.linuxParameters().packageNameMasksToInclude().get(0)); - Assertions.assertEquals("yoxgvcltbgsnc", model.linuxParameters().packageNameMasksToExclude().get(0)); + Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T16:37:43Z"), + model.windowsParameters().maxPatchPublishDate()); + Assertions.assertEquals(VMGuestPatchClassificationLinux.OTHER, + model.linuxParameters().classificationsToInclude().get(0)); + Assertions.assertEquals("almuzyoxaepdkzja", model.linuxParameters().packageNameMasksToInclude().get(0)); + Assertions.assertEquals("xrhdwbavxbniwdjs", model.linuxParameters().packageNameMasksToExclude().get(0)); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineInstallPatchesResultInnerTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineInstallPatchesResultInnerTests.java index 20a17f824fd5..f92d8a33cfa2 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineInstallPatchesResultInnerTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineInstallPatchesResultInnerTests.java @@ -10,11 +10,9 @@ public final class MachineInstallPatchesResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MachineInstallPatchesResultInner model = - BinaryData - .fromString( - "{\"status\":\"Succeeded\",\"installationActivityId\":\"azzmhjrunmpxt\",\"rebootStatus\":\"Completed\",\"maintenanceWindowExceeded\":true,\"excludedPatchCount\":826548714,\"notSelectedPatchCount\":1474388654,\"pendingPatchCount\":307935551,\"installedPatchCount\":1850668583,\"failedPatchCount\":1795094625,\"startDateTime\":\"2021-11-21T19:18Z\",\"lastModifiedDateTime\":\"2021-04-01T15:14:17Z\",\"startedBy\":\"Platform\",\"patchServiceUsed\":\"Zypper\",\"osType\":\"Windows\"}") - .toObject(MachineInstallPatchesResultInner.class); + MachineInstallPatchesResultInner model = BinaryData.fromString( + "{\"status\":\"CompletedWithWarnings\",\"installationActivityId\":\"m\",\"rebootStatus\":\"Required\",\"maintenanceWindowExceeded\":false,\"excludedPatchCount\":865900212,\"notSelectedPatchCount\":1971435113,\"pendingPatchCount\":435215346,\"installedPatchCount\":746279797,\"failedPatchCount\":996509936,\"startDateTime\":\"2021-09-17T17:08:43Z\",\"lastModifiedDateTime\":\"2021-11-20T16:21:10Z\",\"startedBy\":\"Platform\",\"patchServiceUsed\":\"WU_WSUS\",\"osType\":\"Linux\"}") + .toObject(MachineInstallPatchesResultInner.class); } @org.junit.jupiter.api.Test 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 000000000000..63e5442ca649 --- /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\":\"fbtkuwhhmhyk\",\"scriptUri\":\"oxafn\",\"commandId\":\"lpichk\",\"scriptUriManagedIdentity\":{\"clientId\":\"kcdyhbpk\",\"objectId\":\"wdreqnovvqfovl\"}}") + .toObject(MachineRunCommandScriptSource.class); + Assertions.assertEquals("fbtkuwhhmhyk", model.script()); + Assertions.assertEquals("oxafn", model.scriptUri()); + Assertions.assertEquals("lpichk", model.commandId()); + Assertions.assertEquals("kcdyhbpk", model.scriptUriManagedIdentity().clientId()); + Assertions.assertEquals("wdreqnovvqfovl", model.scriptUriManagedIdentity().objectId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MachineRunCommandScriptSource model = new MachineRunCommandScriptSource().withScript("fbtkuwhhmhyk") + .withScriptUri("oxafn") + .withCommandId("lpichk") + .withScriptUriManagedIdentity( + new RunCommandManagedIdentity().withClientId("kcdyhbpk").withObjectId("wdreqnovvqfovl")); + model = BinaryData.fromObject(model).toObject(MachineRunCommandScriptSource.class); + Assertions.assertEquals("fbtkuwhhmhyk", model.script()); + Assertions.assertEquals("oxafn", model.scriptUri()); + Assertions.assertEquals("lpichk", model.commandId()); + Assertions.assertEquals("kcdyhbpk", model.scriptUriManagedIdentity().clientId()); + Assertions.assertEquals("wdreqnovvqfovl", 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 000000000000..35fecda6e81c --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandUpdateTests.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.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\":{\"pnfqntcyp\":\"utpwoqhihejqgw\",\"rcizjxvyd\":\"xjvfoimwksl\",\"t\":\"ceacvlhvygdy\"}}") + .toObject(MachineRunCommandUpdate.class); + Assertions.assertEquals("utpwoqhihejqgw", model.tags().get("pnfqntcyp")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + MachineRunCommandUpdate model = new MachineRunCommandUpdate() + .withTags(mapOf("pnfqntcyp", "utpwoqhihejqgw", "rcizjxvyd", "xjvfoimwksl", "t", "ceacvlhvygdy")); + model = BinaryData.fromObject(model).toObject(MachineRunCommandUpdate.class); + Assertions.assertEquals("utpwoqhihejqgw", model.tags().get("pnfqntcyp")); + } + + // 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/MachineRunCommandsDeleteMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsDeleteMockTests.java new file mode 100644 index 000000000000..63e8e796fb5f --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineRunCommandsDeleteMockTests.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.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 java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class MachineRunCommandsDeleteMockTests { + @Test + public void testDelete() throws Exception { + String responseStr = "{}"; + + 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)); + + manager.machineRunCommands().delete("slhhxudbxv", "d", "tnsi", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineUpdatePropertiesTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineUpdatePropertiesTests.java index 0a70b8268bbd..ed9c0310bd73 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineUpdatePropertiesTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachineUpdatePropertiesTests.java @@ -14,78 +14,69 @@ import com.azure.resourcemanager.hybridcompute.models.OSProfileLinuxConfiguration; import com.azure.resourcemanager.hybridcompute.models.OSProfileWindowsConfiguration; import com.azure.resourcemanager.hybridcompute.models.PatchModeTypes; +import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class MachineUpdatePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MachineUpdateProperties model = - BinaryData - .fromString( - "{\"locationData\":{\"name\":\"spughftqsxhq\",\"city\":\"j\",\"district\":\"kndxdigrjgu\",\"countryOrRegion\":\"zdmsyqtfi\"},\"osProfile\":{\"computerName\":\"botzingamvppho\",\"windowsConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"Manual\"}},\"linuxConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"ImageDefault\"}}},\"cloudMetadata\":{\"provider\":\"wynwcvtbvkayhm\"},\"agentUpgrade\":{\"desiredVersion\":\"yqiatkzwp\",\"correlationId\":\"p\",\"enableAutomaticUpgrade\":true,\"lastAttemptDesiredVersion\":\"a\",\"lastAttemptTimestamp\":\"gvvs\",\"lastAttemptStatus\":\"Failed\",\"lastAttemptMessage\":\"jguq\"},\"parentClusterResourceId\":\"wygzlvdnkfxusem\",\"privateLinkScopeResourceId\":\"zrmuhapfcqdps\"}") - .toObject(MachineUpdateProperties.class); - Assertions.assertEquals("spughftqsxhq", model.locationData().name()); - Assertions.assertEquals("j", model.locationData().city()); - Assertions.assertEquals("kndxdigrjgu", model.locationData().district()); - Assertions.assertEquals("zdmsyqtfi", model.locationData().countryOrRegion()); - Assertions - .assertEquals( - AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.osProfile().windowsConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().windowsConfiguration().patchMode()); - Assertions - .assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.osProfile().linuxConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.osProfile().linuxConfiguration().patchMode()); - Assertions.assertEquals("yqiatkzwp", model.agentUpgrade().desiredVersion()); - Assertions.assertEquals("p", model.agentUpgrade().correlationId()); - Assertions.assertEquals(true, model.agentUpgrade().enableAutomaticUpgrade()); - Assertions.assertEquals("wygzlvdnkfxusem", model.parentClusterResourceId()); - Assertions.assertEquals("zrmuhapfcqdps", model.privateLinkScopeResourceId()); + MachineUpdateProperties model = BinaryData.fromString( + "{\"locationData\":{\"name\":\"fffiak\",\"city\":\"pqqmted\",\"district\":\"mmji\",\"countryOrRegion\":\"eozphv\"},\"osProfile\":{\"computerName\":\"y\",\"windowsConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"ImageDefault\"}},\"linuxConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"Manual\"}}},\"cloudMetadata\":{\"provider\":\"wx\"},\"agentUpgrade\":{\"desiredVersion\":\"evzhfsto\",\"correlationId\":\"6987caf8-a707-4d0b-8b3b-0de7abb8a64a\",\"enableAutomaticUpgrade\":false,\"lastAttemptDesiredVersion\":\"ujbypelmcuvhixb\",\"lastAttemptTimestamp\":\"2021-07-14T21:41:35Z\",\"lastAttemptStatus\":\"Success\",\"lastAttemptMessage\":\"yl\"},\"parentClusterResourceId\":\"ool\",\"privateLinkScopeResourceId\":\"tpkiwkkbnujry\"}") + .toObject(MachineUpdateProperties.class); + Assertions.assertEquals("fffiak", model.locationData().name()); + Assertions.assertEquals("pqqmted", model.locationData().city()); + Assertions.assertEquals("mmji", model.locationData().district()); + Assertions.assertEquals("eozphv", model.locationData().countryOrRegion()); + Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, + model.osProfile().windowsConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.osProfile().windowsConfiguration().patchMode()); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, + model.osProfile().linuxConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().linuxConfiguration().patchMode()); + Assertions.assertEquals("evzhfsto", model.agentUpgrade().desiredVersion()); + Assertions.assertEquals(UUID.fromString("6987caf8-a707-4d0b-8b3b-0de7abb8a64a"), + model.agentUpgrade().correlationId()); + Assertions.assertEquals(false, model.agentUpgrade().enableAutomaticUpgrade()); + Assertions.assertEquals("ool", model.parentClusterResourceId()); + Assertions.assertEquals("tpkiwkkbnujry", model.privateLinkScopeResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineUpdateProperties model = - new MachineUpdateProperties() - .withLocationData( - new LocationData() - .withName("spughftqsxhq") - .withCity("j") - .withDistrict("kndxdigrjgu") - .withCountryOrRegion("zdmsyqtfi")) - .withOsProfile( - new OSProfile() - .withWindowsConfiguration( - new OSProfileWindowsConfiguration() - .withAssessmentMode(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM) - .withPatchMode(PatchModeTypes.MANUAL)) - .withLinuxConfiguration( - new OSProfileLinuxConfiguration() - .withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) - .withPatchMode(PatchModeTypes.IMAGE_DEFAULT))) - .withCloudMetadata(new CloudMetadata()) - .withAgentUpgrade( - new AgentUpgrade() - .withDesiredVersion("yqiatkzwp") - .withCorrelationId("p") - .withEnableAutomaticUpgrade(true)) - .withParentClusterResourceId("wygzlvdnkfxusem") - .withPrivateLinkScopeResourceId("zrmuhapfcqdps"); + MachineUpdateProperties model = new MachineUpdateProperties() + .withLocationData(new LocationData().withName("fffiak") + .withCity("pqqmted") + .withDistrict("mmji") + .withCountryOrRegion("eozphv")) + .withOsProfile(new OSProfile() + .withWindowsConfiguration( + new OSProfileWindowsConfiguration().withAssessmentMode(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM) + .withPatchMode(PatchModeTypes.IMAGE_DEFAULT)) + .withLinuxConfiguration( + new OSProfileLinuxConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) + .withPatchMode(PatchModeTypes.MANUAL))) + .withCloudMetadata(new CloudMetadata()) + .withAgentUpgrade(new AgentUpgrade().withDesiredVersion("evzhfsto") + .withCorrelationId(UUID.fromString("6987caf8-a707-4d0b-8b3b-0de7abb8a64a")) + .withEnableAutomaticUpgrade(false)) + .withParentClusterResourceId("ool") + .withPrivateLinkScopeResourceId("tpkiwkkbnujry"); model = BinaryData.fromObject(model).toObject(MachineUpdateProperties.class); - Assertions.assertEquals("spughftqsxhq", model.locationData().name()); - Assertions.assertEquals("j", model.locationData().city()); - Assertions.assertEquals("kndxdigrjgu", model.locationData().district()); - Assertions.assertEquals("zdmsyqtfi", model.locationData().countryOrRegion()); - Assertions - .assertEquals( - AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.osProfile().windowsConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().windowsConfiguration().patchMode()); - Assertions - .assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.osProfile().linuxConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.osProfile().linuxConfiguration().patchMode()); - Assertions.assertEquals("yqiatkzwp", model.agentUpgrade().desiredVersion()); - Assertions.assertEquals("p", model.agentUpgrade().correlationId()); - Assertions.assertEquals(true, model.agentUpgrade().enableAutomaticUpgrade()); - Assertions.assertEquals("wygzlvdnkfxusem", model.parentClusterResourceId()); - Assertions.assertEquals("zrmuhapfcqdps", model.privateLinkScopeResourceId()); + Assertions.assertEquals("fffiak", model.locationData().name()); + Assertions.assertEquals("pqqmted", model.locationData().city()); + Assertions.assertEquals("mmji", model.locationData().district()); + Assertions.assertEquals("eozphv", model.locationData().countryOrRegion()); + Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, + model.osProfile().windowsConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.osProfile().windowsConfiguration().patchMode()); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, + model.osProfile().linuxConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().linuxConfiguration().patchMode()); + Assertions.assertEquals("evzhfsto", model.agentUpgrade().desiredVersion()); + Assertions.assertEquals(UUID.fromString("6987caf8-a707-4d0b-8b3b-0de7abb8a64a"), + model.agentUpgrade().correlationId()); + Assertions.assertEquals(false, model.agentUpgrade().enableAutomaticUpgrade()); + Assertions.assertEquals("ool", model.parentClusterResourceId()); + Assertions.assertEquals("tpkiwkkbnujry", model.privateLinkScopeResourceId()); } } 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 84b1164b603c..2211695cd0c7 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 @@ -19,99 +19,78 @@ import com.azure.resourcemanager.hybridcompute.models.ResourceIdentityType; import java.util.HashMap; import java.util.Map; +import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class MachineUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MachineUpdate model = - BinaryData - .fromString( - "{\"identity\":{\"principalId\":\"vpsvuoymgcce\",\"tenantId\":\"ezrypql\",\"type\":\"SystemAssigned\"},\"kind\":\"VMware\",\"properties\":{\"locationData\":{\"name\":\"qwkyhkobop\",\"city\":\"edkowepbqpcrfk\",\"district\":\"ccsnjvcdwxlpq\",\"countryOrRegion\":\"ftnkhtj\"},\"osProfile\":{\"computerName\":\"ngwfqatm\",\"windowsConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"AutomaticByPlatform\"}},\"linuxConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"Manual\"}}},\"cloudMetadata\":{\"provider\":\"zywkb\"},\"agentUpgrade\":{\"desiredVersion\":\"yuzhlhkjoqrvq\",\"correlationId\":\"atjinrvgoupmfiib\",\"enableAutomaticUpgrade\":false,\"lastAttemptDesiredVersion\":\"ioolvrwxkvtkkgll\",\"lastAttemptTimestamp\":\"jygvjayvbl\",\"lastAttemptStatus\":\"Failed\",\"lastAttemptMessage\":\"zuhbxvvyhgsopb\"},\"parentClusterResourceId\":\"qufegxuvwzfbn\",\"privateLinkScopeResourceId\":\"mctlpdngitv\"},\"tags\":{\"jejveg\":\"hrixkwmy\",\"eaxhcexdrrvqahqk\":\"hbpnaixexccbd\",\"hyjsvfycx\":\"htpwij\",\"t\":\"bfvoowvrv\"}}") - .toObject(MachineUpdate.class); - Assertions.assertEquals("hrixkwmy", model.tags().get("jejveg")); + MachineUpdate model = BinaryData.fromString( + "{\"identity\":{\"principalId\":\"y\",\"tenantId\":\"fpncurdo\",\"type\":\"SystemAssigned\"},\"kind\":\"AVS\",\"properties\":{\"locationData\":{\"name\":\"ywub\",\"city\":\"bihwqknfdnt\",\"district\":\"chrdgoihxumwcto\",\"countryOrRegion\":\"zj\"},\"osProfile\":{\"computerName\":\"dfdlwggyts\",\"windowsConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"Manual\"}},\"linuxConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"ImageDefault\"}}},\"cloudMetadata\":{\"provider\":\"ufxqknpirgnepttw\"},\"agentUpgrade\":{\"desiredVersion\":\"niffcdmqnroj\",\"correlationId\":\"585b6982-1c41-4d42-9684-74510e84c8ea\",\"enableAutomaticUpgrade\":false,\"lastAttemptDesiredVersion\":\"k\",\"lastAttemptTimestamp\":\"2021-03-24T12:07:41Z\",\"lastAttemptStatus\":\"Failed\",\"lastAttemptMessage\":\"hcrat\"},\"parentClusterResourceId\":\"zronasxift\",\"privateLinkScopeResourceId\":\"qyzhf\"},\"tags\":{\"lgnyhmo\":\"sgogczhonnxk\",\"h\":\"sxkkg\"}}") + .toObject(MachineUpdate.class); + Assertions.assertEquals("sgogczhonnxk", model.tags().get("lgnyhmo")); Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(ArcKindEnum.VMWARE, model.kind()); - Assertions.assertEquals("qwkyhkobop", model.locationData().name()); - Assertions.assertEquals("edkowepbqpcrfk", model.locationData().city()); - Assertions.assertEquals("ccsnjvcdwxlpq", model.locationData().district()); - Assertions.assertEquals("ftnkhtj", model.locationData().countryOrRegion()); - Assertions - .assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.osProfile().windowsConfiguration().assessmentMode()); - Assertions - .assertEquals(PatchModeTypes.AUTOMATIC_BY_PLATFORM, model.osProfile().windowsConfiguration().patchMode()); - Assertions - .assertEquals( - AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.osProfile().linuxConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().linuxConfiguration().patchMode()); - Assertions.assertEquals("yuzhlhkjoqrvq", model.agentUpgrade().desiredVersion()); - Assertions.assertEquals("atjinrvgoupmfiib", model.agentUpgrade().correlationId()); + Assertions.assertEquals(ArcKindEnum.AVS, model.kind()); + Assertions.assertEquals("ywub", model.locationData().name()); + Assertions.assertEquals("bihwqknfdnt", model.locationData().city()); + Assertions.assertEquals("chrdgoihxumwcto", model.locationData().district()); + Assertions.assertEquals("zj", model.locationData().countryOrRegion()); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, + model.osProfile().windowsConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().windowsConfiguration().patchMode()); + Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, + model.osProfile().linuxConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.osProfile().linuxConfiguration().patchMode()); + Assertions.assertEquals("niffcdmqnroj", model.agentUpgrade().desiredVersion()); + Assertions.assertEquals(UUID.fromString("585b6982-1c41-4d42-9684-74510e84c8ea"), + model.agentUpgrade().correlationId()); Assertions.assertEquals(false, model.agentUpgrade().enableAutomaticUpgrade()); - Assertions.assertEquals("qufegxuvwzfbn", model.parentClusterResourceId()); - Assertions.assertEquals("mctlpdngitv", model.privateLinkScopeResourceId()); + Assertions.assertEquals("zronasxift", model.parentClusterResourceId()); + Assertions.assertEquals("qyzhf", model.privateLinkScopeResourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MachineUpdate model = - new MachineUpdate() - .withTags( - mapOf( - "jejveg", - "hrixkwmy", - "eaxhcexdrrvqahqk", - "hbpnaixexccbd", - "hyjsvfycx", - "htpwij", - "t", - "bfvoowvrv")) - .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withKind(ArcKindEnum.VMWARE) - .withLocationData( - new LocationData() - .withName("qwkyhkobop") - .withCity("edkowepbqpcrfk") - .withDistrict("ccsnjvcdwxlpq") - .withCountryOrRegion("ftnkhtj")) - .withOsProfile( - new OSProfile() - .withWindowsConfiguration( - new OSProfileWindowsConfiguration() - .withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) - .withPatchMode(PatchModeTypes.AUTOMATIC_BY_PLATFORM)) - .withLinuxConfiguration( - new OSProfileLinuxConfiguration() - .withAssessmentMode(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM) - .withPatchMode(PatchModeTypes.MANUAL))) - .withCloudMetadata(new CloudMetadata()) - .withAgentUpgrade( - new AgentUpgrade() - .withDesiredVersion("yuzhlhkjoqrvq") - .withCorrelationId("atjinrvgoupmfiib") - .withEnableAutomaticUpgrade(false)) - .withParentClusterResourceId("qufegxuvwzfbn") - .withPrivateLinkScopeResourceId("mctlpdngitv"); + MachineUpdate model = new MachineUpdate().withTags(mapOf("lgnyhmo", "sgogczhonnxk", "h", "sxkkg")) + .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withKind(ArcKindEnum.AVS) + .withLocationData(new LocationData().withName("ywub") + .withCity("bihwqknfdnt") + .withDistrict("chrdgoihxumwcto") + .withCountryOrRegion("zj")) + .withOsProfile(new OSProfile() + .withWindowsConfiguration( + new OSProfileWindowsConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) + .withPatchMode(PatchModeTypes.MANUAL)) + .withLinuxConfiguration( + new OSProfileLinuxConfiguration().withAssessmentMode(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM) + .withPatchMode(PatchModeTypes.IMAGE_DEFAULT))) + .withCloudMetadata(new CloudMetadata()) + .withAgentUpgrade(new AgentUpgrade().withDesiredVersion("niffcdmqnroj") + .withCorrelationId(UUID.fromString("585b6982-1c41-4d42-9684-74510e84c8ea")) + .withEnableAutomaticUpgrade(false)) + .withParentClusterResourceId("zronasxift") + .withPrivateLinkScopeResourceId("qyzhf"); model = BinaryData.fromObject(model).toObject(MachineUpdate.class); - Assertions.assertEquals("hrixkwmy", model.tags().get("jejveg")); + Assertions.assertEquals("sgogczhonnxk", model.tags().get("lgnyhmo")); Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals(ArcKindEnum.VMWARE, model.kind()); - Assertions.assertEquals("qwkyhkobop", model.locationData().name()); - Assertions.assertEquals("edkowepbqpcrfk", model.locationData().city()); - Assertions.assertEquals("ccsnjvcdwxlpq", model.locationData().district()); - Assertions.assertEquals("ftnkhtj", model.locationData().countryOrRegion()); - Assertions - .assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.osProfile().windowsConfiguration().assessmentMode()); - Assertions - .assertEquals(PatchModeTypes.AUTOMATIC_BY_PLATFORM, model.osProfile().windowsConfiguration().patchMode()); - Assertions - .assertEquals( - AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.osProfile().linuxConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().linuxConfiguration().patchMode()); - Assertions.assertEquals("yuzhlhkjoqrvq", model.agentUpgrade().desiredVersion()); - Assertions.assertEquals("atjinrvgoupmfiib", model.agentUpgrade().correlationId()); + Assertions.assertEquals(ArcKindEnum.AVS, model.kind()); + Assertions.assertEquals("ywub", model.locationData().name()); + Assertions.assertEquals("bihwqknfdnt", model.locationData().city()); + Assertions.assertEquals("chrdgoihxumwcto", model.locationData().district()); + Assertions.assertEquals("zj", model.locationData().countryOrRegion()); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, + model.osProfile().windowsConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.MANUAL, model.osProfile().windowsConfiguration().patchMode()); + Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, + model.osProfile().linuxConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.osProfile().linuxConfiguration().patchMode()); + Assertions.assertEquals("niffcdmqnroj", model.agentUpgrade().desiredVersion()); + Assertions.assertEquals(UUID.fromString("585b6982-1c41-4d42-9684-74510e84c8ea"), + model.agentUpgrade().correlationId()); Assertions.assertEquals(false, model.agentUpgrade().enableAutomaticUpgrade()); - Assertions.assertEquals("qufegxuvwzfbn", model.parentClusterResourceId()); - Assertions.assertEquals("mctlpdngitv", model.privateLinkScopeResourceId()); + Assertions.assertEquals("zronasxift", model.parentClusterResourceId()); + Assertions.assertEquals("qyzhf", model.privateLinkScopeResourceId()); } // Use "Map.of" if available diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesAssessPatchesMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesAssessPatchesMockTests.java index 84def57da36c..87f7dcaa66f7 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesAssessPatchesMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesAssessPatchesMockTests.java @@ -6,59 +6,31 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.MachineAssessPatchesResult; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MachinesAssessPatchesMockTests { @Test public void testAssessPatches() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"status\":\"InProgress\",\"assessmentActivityId\":\"f7ef0e4e-ba75-47a0-be99-9d10c1198bf4\",\"rebootPending\":false,\"availablePatchCountByClassification\":{\"security\":647520979,\"critical\":1866114755,\"definition\":1640419759,\"updateRollup\":1091324962,\"featurePack\":47208488,\"servicePack\":699852198,\"tools\":1290354736,\"updates\":1853467009,\"other\":1860324343},\"startDateTime\":\"2021-05-19T00:01:37Z\",\"lastModifiedDateTime\":\"2020-12-22T02:15:52Z\",\"startedBy\":\"User\",\"patchServiceUsed\":\"WU_WSUS\",\"osType\":\"Windows\"}"; - String responseStr = - "{\"status\":\"Unknown\",\"assessmentActivityId\":\"nrwrbiork\",\"rebootPending\":false,\"availablePatchCountByClassification\":{\"security\":681185824,\"critical\":1038080670,\"definition\":1788432373,\"updateRollup\":2074857851,\"featurePack\":728204459,\"servicePack\":547145469,\"tools\":208031947,\"updates\":2010806413,\"other\":581700333},\"startDateTime\":\"2020-12-27T23:16:18Z\",\"lastModifiedDateTime\":\"2021-10-29T08:24:04Z\",\"startedBy\":\"Platform\",\"patchServiceUsed\":\"Zypper\",\"osType\":\"Linux\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + MachineAssessPatchesResult response + = manager.machines().assessPatches("bdaxconfozauorsu", "okwbqplh", com.azure.core.util.Context.NONE); - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MachineAssessPatchesResult response = - manager.machines().assessPatches("vnuuepzl", "phwzsoldweyuqdu", com.azure.core.util.Context.NONE); } } 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 0d8030c25952..d6b04187e4de 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 @@ -6,56 +6,29 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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 java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MachinesDeleteByResourceGroupWithResponseMockTests { @Test public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + manager.machines() + .deleteByResourceGroupWithResponse("qfzgemjdftul", "ltducea", com.azure.core.util.Context.NONE); - manager.machines().deleteByResourceGroupWithResponse("wrykqgai", "mvikl", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesInstallPatchesMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesInstallPatchesMockTests.java index 54186d9c73dc..ccf396646227 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesInstallPatchesMockTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/MachinesInstallPatchesMockTests.java @@ -6,11 +6,9 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.LinuxParameters; import com.azure.resourcemanager.hybridcompute.models.MachineInstallPatchesParameters; @@ -19,82 +17,43 @@ import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchClassificationWindows; import com.azure.resourcemanager.hybridcompute.models.VMGuestPatchRebootSetting; import com.azure.resourcemanager.hybridcompute.models.WindowsParameters; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; +import java.time.Duration; import java.time.OffsetDateTime; import java.util.Arrays; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class MachinesInstallPatchesMockTests { @Test public void testInstallPatches() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"status\":\"Succeeded\",\"installationActivityId\":\"vutpthjoxo\",\"rebootStatus\":\"Failed\",\"maintenanceWindowExceeded\":true,\"excludedPatchCount\":1976615224,\"notSelectedPatchCount\":791689891,\"pendingPatchCount\":1015646968,\"installedPatchCount\":2072188488,\"failedPatchCount\":1062811723,\"startDateTime\":\"2021-01-28T22:40:19Z\",\"lastModifiedDateTime\":\"2021-11-12T05:30:54Z\",\"startedBy\":\"User\",\"patchServiceUsed\":\"YUM\",\"osType\":\"Linux\"}"; - String responseStr = - "{\"status\":\"InProgress\",\"installationActivityId\":\"lgy\",\"rebootStatus\":\"Completed\",\"maintenanceWindowExceeded\":false,\"excludedPatchCount\":1322513595,\"notSelectedPatchCount\":1107140158,\"pendingPatchCount\":1814921702,\"installedPatchCount\":1315761996,\"failedPatchCount\":624648984,\"startDateTime\":\"2021-09-03T17:34:04Z\",\"lastModifiedDateTime\":\"2021-08-10T19:53:45Z\",\"startedBy\":\"User\",\"patchServiceUsed\":\"WU\",\"osType\":\"Linux\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + MachineInstallPatchesResult response = manager.machines() + .installPatches("rk", "alywjhhgdn", + new MachineInstallPatchesParameters().withMaximumDuration(Duration.parse("PT175H6M53S")) + .withRebootSetting(VMGuestPatchRebootSetting.ALWAYS) + .withWindowsParameters(new WindowsParameters() + .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.SERVICE_PACK)) + .withKbNumbersToInclude(Arrays.asList("iloxggdufiq", "dieuzaofj", "hvcyyysfg", "otcubi")) + .withKbNumbersToExclude(Arrays.asList("ipwoqonmacjek", "izsh", "vcimpev", "gmblrri")) + .withExcludeKbsRequiringReboot(false) + .withMaxPatchPublishDate(OffsetDateTime.parse("2021-02-03T11:24:04Z"))) + .withLinuxParameters(new LinuxParameters() + .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationLinux.OTHER, + VMGuestPatchClassificationLinux.CRITICAL, VMGuestPatchClassificationLinux.CRITICAL, + VMGuestPatchClassificationLinux.CRITICAL)) + .withPackageNameMasksToInclude(Arrays.asList("fscjfnynszquji", "dvoqyt")) + .withPackageNameMasksToExclude(Arrays.asList("owbb"))), + com.azure.core.util.Context.NONE); - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MachineInstallPatchesResult response = - manager - .machines() - .installPatches( - "ieuzaofjchvcyyy", - "fgdo", - new MachineInstallPatchesParameters() - .withMaximumDuration("cubiipuipw") - .withRebootSetting(VMGuestPatchRebootSetting.ALWAYS) - .withWindowsParameters( - new WindowsParameters() - .withClassificationsToInclude( - Arrays - .asList( - VMGuestPatchClassificationWindows.FEATURE_PACK, - VMGuestPatchClassificationWindows.SECURITY)) - .withKbNumbersToInclude(Arrays.asList("k")) - .withKbNumbersToExclude(Arrays.asList("shqvcimpev")) - .withExcludeKbsRequiringReboot(true) - .withMaxPatchPublishDate(OffsetDateTime.parse("2021-10-01T23:14:47Z"))) - .withLinuxParameters( - new LinuxParameters() - .withClassificationsToInclude( - Arrays - .asList( - VMGuestPatchClassificationLinux.CRITICAL, - VMGuestPatchClassificationLinux.OTHER, - VMGuestPatchClassificationLinux.CRITICAL)) - .withPackageNameMasksToInclude(Arrays.asList("xsmiccwrwfscjf")) - .withPackageNameMasksToExclude(Arrays.asList("szqujizdvoq", "tiby"))), - 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 87a24a27a84a..a129fd06fe17 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 @@ -13,23 +13,21 @@ public final class NetworkInterfaceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkInterface model = - BinaryData - .fromString( - "{\"ipAddresses\":[{\"address\":\"ae\",\"ipAddressVersion\":\"fhyhltrpmopjmcma\",\"subnet\":{\"addressPrefix\":\"kthfui\"}}]}") - .toObject(NetworkInterface.class); - Assertions.assertEquals("ae", model.ipAddresses().get(0).address()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.ipAddresses().get(0).ipAddressVersion()); + NetworkInterface model = BinaryData.fromString( + "{\"ipAddresses\":[{\"address\":\"cciw\",\"ipAddressVersion\":\"juqk\",\"subnet\":{\"addressPrefix\":\"ajiwkuo\"}},{\"address\":\"skghsauuimj\",\"ipAddressVersion\":\"xieduugidyjrr\",\"subnet\":{\"addressPrefix\":\"aos\"}},{\"address\":\"xc\",\"ipAddressVersion\":\"npc\",\"subnet\":{\"addressPrefix\":\"cohslkev\"}}]}") + .toObject(NetworkInterface.class); + Assertions.assertEquals("cciw", model.ipAddresses().get(0).address()); + Assertions.assertEquals("juqk", 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("ae").withIpAddressVersion("fhyhltrpmopjmcma"))); + NetworkInterface model = new NetworkInterface() + .withIpAddresses(Arrays.asList(new IpAddress().withAddress("cciw").withIpAddressVersion("juqk"), + new IpAddress().withAddress("skghsauuimj").withIpAddressVersion("xieduugidyjrr"), + new IpAddress().withAddress("xc").withIpAddressVersion("npc"))); model = BinaryData.fromObject(model).toObject(NetworkInterface.class); - Assertions.assertEquals("ae", model.ipAddresses().get(0).address()); - Assertions.assertEquals("fhyhltrpmopjmcma", model.ipAddresses().get(0).ipAddressVersion()); + Assertions.assertEquals("cciw", model.ipAddresses().get(0).address()); + Assertions.assertEquals("juqk", 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 69b76013789c..ffcdc68224d9 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 @@ -14,43 +14,39 @@ public final class NetworkProfileInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkProfileInner model = - BinaryData - .fromString( - "{\"networkInterfaces\":[{\"ipAddresses\":[{\"address\":\"uofqwe\",\"ipAddressVersion\":\"hmenevfyexfwhybc\",\"subnet\":{\"addressPrefix\":\"yvdcsitynnaa\"}}]},{\"ipAddresses\":[{\"address\":\"tehfiqscjeypvh\",\"ipAddressVersion\":\"rkgqhcjrefo\",\"subnet\":{\"addressPrefix\":\"kqsleyyvxy\"}},{\"address\":\"pkc\",\"ipAddressVersion\":\"tpngjcrcczsqpjh\",\"subnet\":{\"addressPrefix\":\"ajvnysounqe\"}}]}]}") - .toObject(NetworkProfileInner.class); - Assertions.assertEquals("uofqwe", model.networkInterfaces().get(0).ipAddresses().get(0).address()); - Assertions - .assertEquals("hmenevfyexfwhybc", model.networkInterfaces().get(0).ipAddresses().get(0).ipAddressVersion()); + NetworkProfileInner model = BinaryData.fromString( + "{\"networkInterfaces\":[{\"ipAddresses\":[{\"address\":\"oppusuesnzw\",\"ipAddressVersion\":\"jbavorxzdm\",\"subnet\":{\"addressPrefix\":\"tbqvudw\"}},{\"address\":\"ndnvo\",\"ipAddressVersion\":\"ujjugwdkcglh\",\"subnet\":{\"addressPrefix\":\"zj\"}},{\"address\":\"ggd\",\"ipAddressVersion\":\"ixhbkuofqweykhm\",\"subnet\":{\"addressPrefix\":\"vfyexfw\"}},{\"address\":\"bcibvyvdcsitynn\",\"ipAddressVersion\":\"mdectehfiqscjey\",\"subnet\":{\"addressPrefix\":\"ezrkgqhcjrefo\"}}]},{\"ipAddresses\":[{\"address\":\"qsl\",\"ipAddressVersion\":\"yvxyqjp\",\"subnet\":{\"addressPrefix\":\"t\"}},{\"address\":\"ngj\",\"ipAddressVersion\":\"cczsq\",\"subnet\":{\"addressPrefix\":\"vmdajvnysou\"}},{\"address\":\"e\",\"ipAddressVersion\":\"noae\",\"subnet\":{\"addressPrefix\":\"hy\"}}]},{\"ipAddresses\":[{\"address\":\"pmopjmc\",\"ipAddressVersion\":\"tuo\",\"subnet\":{\"addressPrefix\":\"fu\"}},{\"address\":\"aodsfcpkv\",\"ipAddressVersion\":\"dpuozmyz\",\"subnet\":{\"addressPrefix\":\"gf\"}}]},{\"ipAddresses\":[{\"address\":\"ezyiuokktwhrdxw\",\"ipAddressVersion\":\"wqsmbsur\",\"subnet\":{\"addressPrefix\":\"moryocfsfksym\"}},{\"address\":\"ys\",\"ipAddressVersion\":\"i\",\"subnet\":{\"addressPrefix\":\"hqyudxorrqnbpoc\"}},{\"address\":\"yifqrvkdvjsllrmv\",\"ipAddressVersion\":\"f\",\"subnet\":{\"addressPrefix\":\"kpnpulexxbczwtr\"}},{\"address\":\"iqzbq\",\"ipAddressVersion\":\"sovmyokacspkwl\",\"subnet\":{\"addressPrefix\":\"obpxjmflbvvn\"}}]}]}") + .toObject(NetworkProfileInner.class); + Assertions.assertEquals("oppusuesnzw", model.networkInterfaces().get(0).ipAddresses().get(0).address()); + Assertions.assertEquals("jbavorxzdm", model.networkInterfaces().get(0).ipAddresses().get(0).ipAddressVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkProfileInner model = - new NetworkProfileInner() + NetworkProfileInner model + = new NetworkProfileInner() .withNetworkInterfaces( - Arrays - .asList( - new NetworkInterface() - .withIpAddresses( - Arrays - .asList( - new IpAddress() - .withAddress("uofqwe") - .withIpAddressVersion("hmenevfyexfwhybc"))), - new NetworkInterface() - .withIpAddresses( - Arrays - .asList( - new IpAddress() - .withAddress("tehfiqscjeypvh") - .withIpAddressVersion("rkgqhcjrefo"), - new IpAddress() - .withAddress("pkc") - .withIpAddressVersion("tpngjcrcczsqpjh"))))); + Arrays.asList( + new NetworkInterface().withIpAddresses( + Arrays.asList(new IpAddress().withAddress("oppusuesnzw").withIpAddressVersion("jbavorxzdm"), + new IpAddress().withAddress("ndnvo").withIpAddressVersion("ujjugwdkcglh"), + new IpAddress().withAddress("ggd").withIpAddressVersion("ixhbkuofqweykhm"), + new IpAddress().withAddress("bcibvyvdcsitynn") + .withIpAddressVersion("mdectehfiqscjey"))), + new NetworkInterface().withIpAddresses( + Arrays.asList(new IpAddress().withAddress("qsl").withIpAddressVersion("yvxyqjp"), + new IpAddress().withAddress("ngj").withIpAddressVersion("cczsq"), + new IpAddress().withAddress("e").withIpAddressVersion("noae"))), + new NetworkInterface().withIpAddresses( + Arrays.asList(new IpAddress().withAddress("pmopjmc").withIpAddressVersion("tuo"), + new IpAddress().withAddress("aodsfcpkv").withIpAddressVersion("dpuozmyz"))), + new NetworkInterface().withIpAddresses(Arrays.asList( + new IpAddress().withAddress("ezyiuokktwhrdxw").withIpAddressVersion("wqsmbsur"), + new IpAddress().withAddress("ys").withIpAddressVersion("i"), + new IpAddress().withAddress("yifqrvkdvjsllrmv").withIpAddressVersion("f"), + new IpAddress().withAddress("iqzbq").withIpAddressVersion("sovmyokacspkwl"))))); model = BinaryData.fromObject(model).toObject(NetworkProfileInner.class); - Assertions.assertEquals("uofqwe", model.networkInterfaces().get(0).ipAddresses().get(0).address()); - Assertions - .assertEquals("hmenevfyexfwhybc", model.networkInterfaces().get(0).ipAddresses().get(0).ipAddressVersion()); + Assertions.assertEquals("oppusuesnzw", model.networkInterfaces().get(0).ipAddresses().get(0).address()); + Assertions.assertEquals("jbavorxzdm", 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 0fdea0770cc1..6eaecfea53cf 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 @@ -6,64 +6,35 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.NetworkProfile; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class NetworkProfilesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"networkInterfaces\":[{\"ipAddresses\":[{\"address\":\"jjidjk\",\"ipAddressVersion\":\"xkyxvxevblbj\",\"subnet\":{}},{\"address\":\"ljlageuaulxu\",\"ipAddressVersion\":\"mjbnk\",\"subnet\":{}},{\"address\":\"ynenlsvxeizz\",\"ipAddressVersion\":\"klnsrmffey\",\"subnet\":{}}]},{\"ipAddresses\":[{\"address\":\"piymerteea\",\"ipAddressVersion\":\"xqiekkkzddrtk\",\"subnet\":{}}]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NetworkProfile response = - manager.networkProfiles().getWithResponse("atjeaahh", "jhhn", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("jjidjk", response.networkInterfaces().get(0).ipAddresses().get(0).address()); - Assertions - .assertEquals("xkyxvxevblbj", response.networkInterfaces().get(0).ipAddresses().get(0).ipAddressVersion()); + String responseStr + = "{\"networkInterfaces\":[{\"ipAddresses\":[{\"address\":\"xasicddyvvjskg\",\"ipAddressVersion\":\"ocwah\",\"subnet\":{}},{\"address\":\"atjeaahh\",\"ipAddressVersion\":\"hhnakzybbj\",\"subnet\":{}}]},{\"ipAddresses\":[{\"address\":\"syxkyxvxevblb\",\"ipAddressVersion\":\"dnlj\",\"subnet\":{}}]},{\"ipAddresses\":[{\"address\":\"aulx\",\"ipAddressVersion\":\"smjbnkppxyn\",\"subnet\":{}},{\"address\":\"svxeizzgwklnsr\",\"ipAddressVersion\":\"feycxcktp\",\"subnet\":{}}]},{\"ipAddresses\":[{\"address\":\"teeammxqiekkkzd\",\"ipAddressVersion\":\"tkgdojbmxva\",\"subnet\":{}},{\"address\":\"fdeesvecuijpxtx\",\"ipAddressVersion\":\"wprtu\",\"subnet\":{}},{\"address\":\"awddjibab\",\"ipAddressVersion\":\"ititvtzeexavoxt\",\"subnet\":{}},{\"address\":\"ecdmdqbwpy\",\"ipAddressVersion\":\"tgsfja\",\"subnet\":{}}]}]}"; + + 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)); + + NetworkProfile response = manager.networkProfiles() + .getWithResponse("y", "uxakjsqzhzbezk", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("xasicddyvvjskg", response.networkInterfaces().get(0).ipAddresses().get(0).address()); + Assertions.assertEquals("ocwah", response.networkInterfaces().get(0).ipAddresses().get(0).ipAddressVersion()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileLinuxConfigurationTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileLinuxConfigurationTests.java index 9a7b5fe0c1cb..3d1646f4932a 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileLinuxConfigurationTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileLinuxConfigurationTests.java @@ -13,22 +13,21 @@ public final class OSProfileLinuxConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OSProfileLinuxConfiguration model = - BinaryData - .fromString("{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"ImageDefault\"}}") - .toObject(OSProfileLinuxConfiguration.class); + OSProfileLinuxConfiguration model = BinaryData + .fromString( + "{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"AutomaticByPlatform\"}}") + .toObject(OSProfileLinuxConfiguration.class); Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.assessmentMode()); - Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.patchMode()); + Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_PLATFORM, model.patchMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OSProfileLinuxConfiguration model = - new OSProfileLinuxConfiguration() - .withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) - .withPatchMode(PatchModeTypes.IMAGE_DEFAULT); + OSProfileLinuxConfiguration model + = new OSProfileLinuxConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) + .withPatchMode(PatchModeTypes.AUTOMATIC_BY_PLATFORM); model = BinaryData.fromObject(model).toObject(OSProfileLinuxConfiguration.class); Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.assessmentMode()); - Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.patchMode()); + Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_PLATFORM, model.patchMode()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileTests.java index a62b124b6242..1d21cce71a5c 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileTests.java @@ -15,33 +15,30 @@ public final class OSProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OSProfile model = - BinaryData - .fromString( - "{\"computerName\":\"icxm\",\"windowsConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"ImageDefault\"}},\"linuxConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"AutomaticByOS\"}}}") - .toObject(OSProfile.class); - Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.windowsConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.windowsConfiguration().patchMode()); - Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.linuxConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.linuxConfiguration().patchMode()); + OSProfile model = BinaryData.fromString( + "{\"computerName\":\"gfycc\",\"windowsConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"AutomaticByPlatform\"}},\"linuxConfiguration\":{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"Manual\"}}}") + .toObject(OSProfile.class); + Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, + model.windowsConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_PLATFORM, model.windowsConfiguration().patchMode()); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.linuxConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.MANUAL, model.linuxConfiguration().patchMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OSProfile model = - new OSProfile() - .withWindowsConfiguration( - new OSProfileWindowsConfiguration() - .withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) - .withPatchMode(PatchModeTypes.IMAGE_DEFAULT)) - .withLinuxConfiguration( - new OSProfileLinuxConfiguration() - .withAssessmentMode(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM) - .withPatchMode(PatchModeTypes.AUTOMATIC_BY_OS)); + OSProfile model = new OSProfile() + .withWindowsConfiguration( + new OSProfileWindowsConfiguration().withAssessmentMode(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM) + .withPatchMode(PatchModeTypes.AUTOMATIC_BY_PLATFORM)) + .withLinuxConfiguration( + new OSProfileLinuxConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) + .withPatchMode(PatchModeTypes.MANUAL)); model = BinaryData.fromObject(model).toObject(OSProfile.class); - Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.windowsConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.windowsConfiguration().patchMode()); - Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.linuxConfiguration().assessmentMode()); - Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.linuxConfiguration().patchMode()); + Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, + model.windowsConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_PLATFORM, model.windowsConfiguration().patchMode()); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.linuxConfiguration().assessmentMode()); + Assertions.assertEquals(PatchModeTypes.MANUAL, model.linuxConfiguration().patchMode()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileWindowsConfigurationTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileWindowsConfigurationTests.java index 2dacb7160088..d2a8c2eed8cf 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileWindowsConfigurationTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/OSProfileWindowsConfigurationTests.java @@ -13,23 +13,20 @@ public final class OSProfileWindowsConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OSProfileWindowsConfiguration model = - BinaryData - .fromString( - "{\"patchSettings\":{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"AutomaticByPlatform\"}}") - .toObject(OSProfileWindowsConfiguration.class); - Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); - Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_PLATFORM, model.patchMode()); + OSProfileWindowsConfiguration model = BinaryData + .fromString("{\"patchSettings\":{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"AutomaticByOS\"}}") + .toObject(OSProfileWindowsConfiguration.class); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.assessmentMode()); + Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.patchMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OSProfileWindowsConfiguration model = - new OSProfileWindowsConfiguration() - .withAssessmentMode(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM) - .withPatchMode(PatchModeTypes.AUTOMATIC_BY_PLATFORM); + OSProfileWindowsConfiguration model + = new OSProfileWindowsConfiguration().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) + .withPatchMode(PatchModeTypes.AUTOMATIC_BY_OS); model = BinaryData.fromObject(model).toObject(OSProfileWindowsConfiguration.class); - Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); - Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_PLATFORM, model.patchMode()); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.assessmentMode()); + Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.patchMode()); } } 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 0b87bebecb79..a9e252f676dc 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 @@ -10,11 +10,9 @@ public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"origin\":\"gpfqbuace\",\"name\":\"zfq\",\"display\":{\"operation\":\"uaopppcqeq\",\"resource\":\"lzdahzxctobgbkdm\",\"description\":\"zpostmgrcfbu\",\"provider\":\"mfqjhhkxbp\"},\"isDataAction\":true}]}") - .toObject(OperationListResult.class); + OperationListResult model = BinaryData.fromString( + "{\"value\":[{\"origin\":\"cers\",\"name\":\"ntnev\",\"display\":{\"operation\":\"jmygtdsslswtmwer\",\"resource\":\"fzp\",\"description\":\"semwabnet\",\"provider\":\"hszhedplvwiwu\"},\"isDataAction\":true},{\"origin\":\"besldnkwwtppjflc\",\"name\":\"gaokonzmnsikv\",\"display\":{\"operation\":\"ze\",\"resource\":\"kdltfzxmhhvhg\",\"description\":\"eodkwobda\",\"provider\":\"tibqdxbxwakb\"},\"isDataAction\":false},{\"origin\":\"ndlkzgxhurip\",\"name\":\"podxunkb\",\"display\":{\"operation\":\"mubyynt\",\"resource\":\"rbqtkoie\",\"description\":\"eotg\",\"provider\":\"l\"},\"isDataAction\":true},{\"origin\":\"wlauwzizxbmpg\",\"name\":\"efuzmuvpbttd\",\"display\":{\"operation\":\"rp\",\"resource\":\"ebmnzbtbhjpglk\",\"description\":\"ohdneuel\",\"provider\":\"hsd\"},\"isDataAction\":false}]}") + .toObject(OperationListResult.class); } @org.junit.jupiter.api.Test 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 322b64999fc7..ed3f0ecc9e1e 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 @@ -10,11 +10,9 @@ public final class OperationValueDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationValueDisplay model = - BinaryData - .fromString( - "{\"operation\":\"hsfxoblytkb\",\"resource\":\"pe\",\"description\":\"wfbkrvrns\",\"provider\":\"hqjohxcrsbfova\"}") - .toObject(OperationValueDisplay.class); + OperationValueDisplay model = BinaryData.fromString( + "{\"operation\":\"crailvpn\",\"resource\":\"fuflrwdmhdlx\",\"description\":\"rxsagafcnihgwqa\",\"provider\":\"edgfbcvkcvq\"}") + .toObject(OperationValueDisplay.class); } @org.junit.jupiter.api.Test 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 a66164d33e65..eb213c7e9331 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 @@ -11,11 +11,9 @@ public final class OperationValueInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationValueInner model = - BinaryData - .fromString( - "{\"origin\":\"jhxxjyn\",\"name\":\"divkrt\",\"display\":{\"operation\":\"xqzvszjfa\",\"resource\":\"j\",\"description\":\"xxivetv\",\"provider\":\"qaqtdoqmcbxvwvxy\"},\"isDataAction\":true}") - .toObject(OperationValueInner.class); + OperationValueInner model = BinaryData.fromString( + "{\"origin\":\"zfikd\",\"name\":\"wq\",\"display\":{\"operation\":\"xzxcl\",\"resource\":\"thhqzonosggbh\",\"description\":\"hfwdsjnkaljutiis\",\"provider\":\"cffgdkzzewk\"},\"isDataAction\":true}") + .toObject(OperationValueInner.class); } @org.junit.jupiter.api.Test 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 c5b1e2089f3f..af62071b039a 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 @@ -6,59 +6,31 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.OperationValue; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class OperationsListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"origin\":\"xlzyqd\",\"name\":\"eg\",\"display\":{\"operation\":\"lzxwhcansy\",\"resource\":\"yqhlwigdivbkbx\",\"description\":\"mf\",\"provider\":\"uwasqvd\"},\"isDataAction\":false}]}"; - String responseStr = - "{\"value\":[{\"origin\":\"uwasqvd\",\"name\":\"y\",\"display\":{\"operation\":\"xakjsqzhzb\",\"resource\":\"kgimsidxasic\",\"description\":\"yvvjskgfmo\",\"provider\":\"ah\"},\"isDataAction\":false}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + 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.operations().list(com.azure.core.util.Context.NONE); + } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PatchSettingsTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PatchSettingsTests.java index 07b6ea1a8c28..75db318be6b0 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PatchSettingsTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PatchSettingsTests.java @@ -13,22 +13,19 @@ public final class PatchSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PatchSettings model = - BinaryData - .fromString("{\"assessmentMode\":\"AutomaticByPlatform\",\"patchMode\":\"AutomaticByOS\"}") + PatchSettings model + = BinaryData.fromString("{\"assessmentMode\":\"ImageDefault\",\"patchMode\":\"ImageDefault\"}") .toObject(PatchSettings.class); - Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); - Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.patchMode()); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.assessmentMode()); + Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.patchMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PatchSettings model = - new PatchSettings() - .withAssessmentMode(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM) - .withPatchMode(PatchModeTypes.AUTOMATIC_BY_OS); + PatchSettings model = new PatchSettings().withAssessmentMode(AssessmentModeTypes.IMAGE_DEFAULT) + .withPatchMode(PatchModeTypes.IMAGE_DEFAULT); model = BinaryData.fromObject(model).toObject(PatchSettings.class); - Assertions.assertEquals(AssessmentModeTypes.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); - Assertions.assertEquals(PatchModeTypes.AUTOMATIC_BY_OS, model.patchMode()); + Assertions.assertEquals(AssessmentModeTypes.IMAGE_DEFAULT, model.assessmentMode()); + Assertions.assertEquals(PatchModeTypes.IMAGE_DEFAULT, model.patchMode()); } } 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 989365b2c820..07b9250e8acd 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 @@ -14,30 +14,24 @@ public final class PrivateEndpointConnectionDataModelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointConnectionDataModel model = - BinaryData - .fromString( - "{\"id\":\"ky\",\"name\":\"beddgssofw\",\"type\":\"zqalkrmnjijpx\",\"properties\":{\"privateEndpoint\":{\"id\":\"udfnbyxba\"},\"privateLinkServiceConnectionState\":{\"status\":\"bjyvay\",\"description\":\"fimrzrtuzqogse\",\"actionsRequired\":\"evfdnwnwm\"},\"provisioningState\":\"zsyyceuzso\",\"groupIds\":[\"ud\",\"frxtrthzvaytdwk\"]}}") - .toObject(PrivateEndpointConnectionDataModel.class); - Assertions.assertEquals("udfnbyxba", model.properties().privateEndpoint().id()); - Assertions.assertEquals("bjyvay", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fimrzrtuzqogse", model.properties().privateLinkServiceConnectionState().description()); + PrivateEndpointConnectionDataModel model = BinaryData.fromString( + "{\"id\":\"bejdcn\",\"name\":\"qmoa\",\"type\":\"fgmjzrwrdgrt\",\"properties\":{\"privateEndpoint\":{\"id\":\"u\"},\"privateLinkServiceConnectionState\":{\"status\":\"kopbminrf\",\"description\":\"woyuhhziuief\",\"actionsRequired\":\"bhdmsmlmzqhof\"},\"provisioningState\":\"maequiahxicslfa\",\"groupIds\":[\"piyylhalnswhccsp\"]}}") + .toObject(PrivateEndpointConnectionDataModel.class); + Assertions.assertEquals("u", model.properties().privateEndpoint().id()); + Assertions.assertEquals("kopbminrf", model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("woyuhhziuief", 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("udfnbyxba")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("bjyvay") - .withDescription("fimrzrtuzqogse"))); + PrivateEndpointConnectionDataModel model = new PrivateEndpointConnectionDataModel().withProperties( + new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpointProperty().withId("u")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionStateProperty().withStatus("kopbminrf") + .withDescription("woyuhhziuief"))); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionDataModel.class); - Assertions.assertEquals("udfnbyxba", model.properties().privateEndpoint().id()); - Assertions.assertEquals("bjyvay", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fimrzrtuzqogse", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("u", model.properties().privateEndpoint().id()); + Assertions.assertEquals("kopbminrf", model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("woyuhhziuief", 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 76514755f836..1358a8d63b17 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 @@ -14,30 +14,27 @@ public final class PrivateEndpointConnectionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"mkkzevdlhe\"},\"privateLinkServiceConnectionState\":{\"status\":\"usdsttwv\",\"description\":\"gvbbejdcng\",\"actionsRequired\":\"m\"},\"provisioningState\":\"kufgmj\",\"groupIds\":[\"rdgrtw\"]},\"id\":\"nuuzkopbm\",\"name\":\"nrfdw\",\"type\":\"yuhhziu\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("mkkzevdlhe", model.properties().privateEndpoint().id()); - Assertions.assertEquals("usdsttwv", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gvbbejdcng", model.properties().privateLinkServiceConnectionState().description()); + PrivateEndpointConnectionInner model = BinaryData.fromString( + "{\"properties\":{\"privateEndpoint\":{\"id\":\"vfbgofeljagrqmqh\"},\"privateLinkServiceConnectionState\":{\"status\":\"vriiio\",\"description\":\"nalghfkvtvsexso\",\"actionsRequired\":\"el\"},\"provisioningState\":\"hhahhxvrhmzkwpjg\",\"groupIds\":[\"pughftqsxh\",\"xujxuknd\",\"digrjguufzdmsyqt\"]},\"id\":\"hwhbotzingamv\",\"name\":\"phoszqz\",\"type\":\"dphqamv\"}") + .toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals("vfbgofeljagrqmqh", model.properties().privateEndpoint().id()); + Assertions.assertEquals("vriiio", model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("nalghfkvtvsexso", + 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("mkkzevdlhe")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("usdsttwv") - .withDescription("gvbbejdcng"))); + PrivateEndpointConnectionInner model + = new PrivateEndpointConnectionInner().withProperties(new PrivateEndpointConnectionProperties() + .withPrivateEndpoint(new PrivateEndpointProperty().withId("vfbgofeljagrqmqh")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionStateProperty().withStatus("vriiio") + .withDescription("nalghfkvtvsexso"))); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("mkkzevdlhe", model.properties().privateEndpoint().id()); - Assertions.assertEquals("usdsttwv", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gvbbejdcng", model.properties().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("vfbgofeljagrqmqh", model.properties().privateEndpoint().id()); + Assertions.assertEquals("vriiio", model.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("nalghfkvtvsexso", + 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 d36c74220553..9d6dc8faac87 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 @@ -10,11 +10,9 @@ public final class PrivateEndpointConnectionListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"hdmsmlmzqhoftrm\"},\"privateLinkServiceConnectionState\":{\"status\":\"qu\",\"description\":\"ah\",\"actionsRequired\":\"cslfaoqzpiyylha\"},\"provisioningState\":\"swhccsphk\",\"groupIds\":[\"witqscywuggwoluh\",\"zbwemh\",\"i\"]},\"id\":\"brgz\",\"name\":\"wmsweypqwd\",\"type\":\"ggicccnxqhue\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"tlstvlzywem\"},\"privateLinkServiceConnectionState\":{\"status\":\"rncsdtclu\",\"description\":\"iypbsfgytgusl\",\"actionsRequired\":\"adcy\"},\"provisioningState\":\"ukyhejhzis\",\"groupIds\":[\"pelol\"]},\"id\":\"vk\",\"name\":\"r\",\"type\":\"qvujzraehtwdwrf\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"byrcdlbhshfwp\"},\"privateLinkServiceConnectionState\":{\"status\":\"cstwity\",\"description\":\"hevxcced\",\"actionsRequired\":\"nmdyodnwzxl\"},\"provisioningState\":\"cvnhltiugc\",\"groupIds\":[\"vvwxqi\",\"y\"]},\"id\":\"nyowxwlmdjrkvfg\",\"name\":\"vfvpdbodaciz\",\"type\":\"j\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"rribd\"},\"privateLinkServiceConnectionState\":{\"status\":\"b\",\"description\":\"ipqkghvxndzwm\",\"actionsRequired\":\"efajpj\"},\"provisioningState\":\"wkqnyhg\",\"groupIds\":[\"tjivfxzsjabib\"]},\"id\":\"stawfsdjpvkv\",\"name\":\"bjxbkzbzk\",\"type\":\"vncjabudurgk\"}],\"nextLink\":\"mokzhjjklf\"}") - .toObject(PrivateEndpointConnectionListResult.class); + PrivateEndpointConnectionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"wcvtbvkayhmtnvyq\"},\"privateLinkServiceConnectionState\":{\"status\":\"tkzwpcnpwzc\",\"description\":\"a\",\"actionsRequired\":\"gvvs\"},\"provisioningState\":\"yajguqfhwygzlv\",\"groupIds\":[\"fxusemdwzr\"]},\"id\":\"hapfcqdpsqx\",\"name\":\"vpsvuoymgcce\",\"type\":\"vezrypqlmfeo\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"wkyhkobopgxe\"},\"privateLinkServiceConnectionState\":{\"status\":\"owepbqpcrfkb\",\"description\":\"ccsnjvcdwxlpq\",\"actionsRequired\":\"ftnkhtj\"},\"provisioningState\":\"i\",\"groupIds\":[\"fq\",\"tmtdhtmdvypgik\"]},\"id\":\"szywkbirryu\",\"name\":\"hlhkjoqrvqqaatj\",\"type\":\"nrvgoupmfiibfgg\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"lvrwxkvtkk\"},\"privateLinkServiceConnectionState\":{\"status\":\"lqwjygvjayvblm\",\"description\":\"vkzuhbxvvyhgso\",\"actionsRequired\":\"yrqufegxuvwz\"},\"provisioningState\":\"nhlmctlpdng\",\"groupIds\":[\"gbmhrixkwmyi\",\"ejvegrhbpnaixex\"]},\"id\":\"b\",\"name\":\"reaxhcexdr\",\"type\":\"vqahqkghtpwi\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"jsvfycxzbfvoowv\"},\"privateLinkServiceConnectionState\":{\"status\":\"mtg\",\"description\":\"qp\",\"actionsRequired\":\"ostronz\"},\"provisioningState\":\"hgfipnsxkmcw\",\"groupIds\":[\"rrjreafxtsgu\",\"hjglikk\"]},\"id\":\"slol\",\"name\":\"qpvuzlmvfelf\",\"type\":\"tgp\"}],\"nextLink\":\"rpw\"}") + .toObject(PrivateEndpointConnectionListResult.class); } @org.junit.jupiter.api.Test 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 8423134e7cc8..3670f7a4111e 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 @@ -13,28 +13,23 @@ public final class PrivateEndpointConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"privateEndpoint\":{\"id\":\"qu\"},\"privateLinkServiceConnectionState\":{\"status\":\"axhexiilivp\",\"description\":\"tiirqtdqoa\",\"actionsRequired\":\"r\"},\"provisioningState\":\"fgsqu\",\"groupIds\":[\"rxxle\",\"tramxjez\"]}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("qu", model.privateEndpoint().id()); - Assertions.assertEquals("axhexiilivp", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("tiirqtdqoa", model.privateLinkServiceConnectionState().description()); + PrivateEndpointConnectionProperties model = BinaryData.fromString( + "{\"privateEndpoint\":{\"id\":\"ivwitqscywugg\"},\"privateLinkServiceConnectionState\":{\"status\":\"luhczbw\",\"description\":\"mhairsbrgzdwmsw\",\"actionsRequired\":\"pqwd\"},\"provisioningState\":\"gicccnxqhuex\",\"groupIds\":[\"tlstvlzywem\",\"zrncsdt\",\"lusiy\",\"bsfgytguslfea\"]}") + .toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals("ivwitqscywugg", model.privateEndpoint().id()); + Assertions.assertEquals("luhczbw", model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("mhairsbrgzdwmsw", model.privateLinkServiceConnectionState().description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpointProperty().withId("qu")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("axhexiilivp") - .withDescription("tiirqtdqoa")); + PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties() + .withPrivateEndpoint(new PrivateEndpointProperty().withId("ivwitqscywugg")) + .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionStateProperty().withStatus("luhczbw") + .withDescription("mhairsbrgzdwmsw")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("qu", model.privateEndpoint().id()); - Assertions.assertEquals("axhexiilivp", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("tiirqtdqoa", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("ivwitqscywugg", model.privateEndpoint().id()); + Assertions.assertEquals("luhczbw", model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("mhairsbrgzdwmsw", 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 7108d4fa2b4c..38d475db861f 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 @@ -6,78 +6,46 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.PrivateEndpointConnection; import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointConnectionProperties; import com.azure.resourcemanager.hybridcompute.models.PrivateEndpointProperty; import com.azure.resourcemanager.hybridcompute.models.PrivateLinkServiceConnectionStateProperty; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"kvxlxpa\"},\"privateLinkServiceConnectionState\":{\"status\":\"qivbgkcvkh\",\"description\":\"zvuqdflvon\",\"actionsRequired\":\"pfpubcpzgpx\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"jxgpnrhgovfg\",\"ik\",\"mhha\",\"wjrmzvuporqzd\"]},\"id\":\"ydzvkf\",\"name\":\"xcnqmxqpswokmvkh\",\"type\":\"ggdhbemzqkzszuw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .define("w") - .withExistingPrivateLinkScope("oiquvrehmrnjhvs", "jztczytqj") - .withProperties( - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpointProperty().withId("nfprnjletlxs")) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionStateProperty() - .withStatus("pddouifamowaziyn") - .withDescription("nlqwzdvpiwhx"))) - .create(); - - Assertions.assertEquals("kvxlxpa", response.properties().privateEndpoint().id()); - Assertions.assertEquals("qivbgkcvkh", response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("zvuqdflvon", response.properties().privateLinkServiceConnectionState().description()); + String responseStr + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"ugjknf\"},\"privateLinkServiceConnectionState\":{\"status\":\"fcttuxuuyilfl\",\"description\":\"oiquvrehmrnjhvs\",\"actionsRequired\":\"ztczytq\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"unfprnjletlxs\",\"rpddouifamo\",\"aziynknlqwzdv\",\"iwhxqszdtmaajq\"]},\"id\":\"uxylrjvmtygjbm\",\"name\":\"yospspshc\",\"type\":\"fkyjpmspbpssdfpp\"}"; + + 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)); + + PrivateEndpointConnection response = manager.privateEndpointConnections() + .define("p") + .withExistingPrivateLinkScope("pakdkifmjnnawt", "abpxuc") + .withProperties(new PrivateEndpointConnectionProperties() + .withPrivateEndpoint(new PrivateEndpointProperty().withId("wey")) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionStateProperty().withStatus("dhlisngwflqqmpi") + .withDescription("ruwnpqxpx"))) + .create(); + + Assertions.assertEquals("ugjknf", response.properties().privateEndpoint().id()); + Assertions.assertEquals("fcttuxuuyilfl", response.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("oiquvrehmrnjhvs", + 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 996aaeae14f3..d21e34c5169b 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 @@ -6,58 +6,29 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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 java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateEndpointConnectionsDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + manager.privateEndpointConnections() + .delete("gnoxuztrksx", "pndfcpfnznt", "jtwkjaos", com.azure.core.util.Context.NONE); - manager - .privateEndpointConnections() - .delete("hdenxaulk", "akdkifmjnnawtqab", "xuckpggqoweyir", 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 a4cb41295568..5f67d2ac78e7 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 @@ -6,67 +6,36 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.PrivateEndpointConnection; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"lagun\"},\"privateLinkServiceConnectionState\":{\"status\":\"gfebwlnb\",\"description\":\"hyreeu\",\"actionsRequired\":\"qavbpdqmj\"},\"provisioningState\":\"yyzglgouwtlmjjy\",\"groupIds\":[\"qtobaxkjeyt\"]},\"id\":\"lbfjkwr\",\"name\":\"snkq\",\"type\":\"hsyrqunj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .getWithResponse("laprlt", "katbhjm", "nnbsoqeqa", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lagun", response.properties().privateEndpoint().id()); - Assertions.assertEquals("gfebwlnb", response.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("hyreeu", response.properties().privateLinkServiceConnectionState().description()); + String responseStr + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"z\"},\"privateLinkServiceConnectionState\":{\"status\":\"xcoxpelnjet\",\"description\":\"gltsxoat\",\"actionsRequired\":\"g\"},\"provisioningState\":\"npbs\",\"groupIds\":[\"floccsrmozih\"]},\"id\":\"pgawtxxpkyjcxcjx\",\"name\":\"rytfmpcycil\",\"type\":\"mcayk\"}"; + + 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)); + + PrivateEndpointConnection response = manager.privateEndpointConnections() + .getWithResponse("jsxjwwix", "vumwmxqh", "dvnoamldsehaohdj", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("z", response.properties().privateEndpoint().id()); + Assertions.assertEquals("xcoxpelnjet", response.properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("gltsxoat", 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 2fa2076d201d..6bba77382943 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 @@ -6,71 +6,38 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.PrivateEndpointConnection; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateEndpointConnectionsListByPrivateLinkScopeMockTests { @Test public void testListByPrivateLinkScope() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"pqxpx\"},\"privateLinkServiceConnectionState\":{\"status\":\"fcngjsa\",\"description\":\"sii\",\"actionsRequired\":\"mkzjvkviir\"},\"provisioningState\":\"fgrwsdpgratzvz\",\"groupIds\":[\"byvi\",\"tctbrxkjzwrgxffm\",\"hkwfbkgozxwop\",\"bydpizqaclnapxb\"]},\"id\":\"gn\",\"name\":\"gjkn\",\"type\":\"smfcttuxuuyilfl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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 - .privateEndpointConnections() - .listByPrivateLinkScope("hlisngw", "lqqmpiz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pqxpx", response.iterator().next().properties().privateEndpoint().id()); - Assertions - .assertEquals( - "fcngjsa", response.iterator().next().properties().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals( - "sii", response.iterator().next().properties().privateLinkServiceConnectionState().description()); + String responseStr + = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"tlaprltzkatb\"},\"privateLinkServiceConnectionState\":{\"status\":\"mznnbsoqeqalarvl\",\"description\":\"gunbtgfebwlnbm\",\"actionsRequired\":\"reeudzqavb\"},\"provisioningState\":\"qmjxlyyzglgouwtl\",\"groupIds\":[\"yuojqtobaxk\",\"eytu\",\"lbfjkwr\",\"snkq\"]},\"id\":\"syrq\",\"name\":\"njqhdenxa\",\"type\":\"l\"}]}"; + + 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.privateEndpointConnections() + .listByPrivateLinkScope("xuzvoamktcqi", "smgbzahgxqdl", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("tlaprltzkatb", response.iterator().next().properties().privateEndpoint().id()); + Assertions.assertEquals("mznnbsoqeqalarvl", + response.iterator().next().properties().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("gunbtgfebwlnbm", + 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 b4a338692a28..cab71a8da816 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 @@ -11,15 +11,15 @@ public final class PrivateEndpointPropertyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpointProperty model = - BinaryData.fromString("{\"id\":\"wnwxuqlcvyd\"}").toObject(PrivateEndpointProperty.class); - Assertions.assertEquals("wnwxuqlcvyd", model.id()); + PrivateEndpointProperty model + = BinaryData.fromString("{\"id\":\"ygqukyhejh\"}").toObject(PrivateEndpointProperty.class); + Assertions.assertEquals("ygqukyhejh", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateEndpointProperty model = new PrivateEndpointProperty().withId("wnwxuqlcvyd"); + PrivateEndpointProperty model = new PrivateEndpointProperty().withId("ygqukyhejh"); model = BinaryData.fromObject(model).toObject(PrivateEndpointProperty.class); - Assertions.assertEquals("wnwxuqlcvyd", model.id()); + Assertions.assertEquals("ygqukyhejh", 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 41b0f4d18b88..d0fb15277a06 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 @@ -11,17 +11,15 @@ public final class PrivateLinkResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"ndo\",\"requiredMembers\":[\"gbjcntujitcjed\"],\"requiredZoneNames\":[\"waezkojvd\"]},\"id\":\"zfoqouicybxar\",\"name\":\"gszufoxciqopid\",\"type\":\"amcio\"}") - .toObject(PrivateLinkResourceInner.class); + PrivateLinkResourceInner model = BinaryData.fromString( + "{\"properties\":{\"groupId\":\"qfxssmwutw\",\"requiredMembers\":[\"rezpdr\",\"neuyow\"],\"requiredZoneNames\":[\"wyt\"]},\"id\":\"ib\",\"name\":\"rcgp\",\"type\":\"kpzi\"}") + .toObject(PrivateLinkResourceInner.class); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkResourceInner model = - new PrivateLinkResourceInner().withProperties(new PrivateLinkResourceProperties()); + PrivateLinkResourceInner model + = new PrivateLinkResourceInner().withProperties(new PrivateLinkResourceProperties()); model = BinaryData.fromObject(model).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 9208c9f4bf5e..0d14dcccf1f2 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 @@ -10,11 +10,9 @@ public final class PrivateLinkResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"sobqw\",\"requiredMembers\":[\"bnwdcfh\"],\"requiredZoneNames\":[\"dpfuvg\",\"sbjjc\",\"nvxbvt\",\"udutnco\"]},\"id\":\"r\",\"name\":\"xqtvcofu\",\"type\":\"f\"},{\"properties\":{\"groupId\":\"gj\",\"requiredMembers\":[\"dknnqvsazn\",\"n\"],\"requiredZoneNames\":[\"udsgs\",\"hmk\"]},\"id\":\"grauwjuetaebur\",\"name\":\"vdmovsmzlxwabm\",\"type\":\"oefki\"}],\"nextLink\":\"vtpuqujmqlgk\"}") - .toObject(PrivateLinkResourceListResult.class); + PrivateLinkResourceListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"xqi\",\"requiredMembers\":[\"unyowxwl\",\"djrkvfgbvfvpd\",\"odacizs\",\"q\"],\"requiredZoneNames\":[\"rribd\",\"ibqipqkg\",\"vxndz\"]},\"id\":\"krefajpjo\",\"name\":\"wkqnyhg\",\"type\":\"ij\"},{\"properties\":{\"groupId\":\"vfxzsjab\",\"requiredMembers\":[\"ystawfsdjpvkvp\",\"jxbkzbzkdvn\",\"jabudurgkakmo\"],\"requiredZoneNames\":[\"jjklff\",\"mouwqlgzrfzeey\"]},\"id\":\"izikayuhq\",\"name\":\"bjbsybb\",\"type\":\"wrv\"}],\"nextLink\":\"dgmfpgvmpipasl\"}") + .toObject(PrivateLinkResourceListResult.class); } @org.junit.jupiter.api.Test 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 d2fc20abdda9..1bb3bf6eb7e3 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 @@ -10,11 +10,9 @@ public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"khazxkhnzbonlwn\",\"requiredMembers\":[\"gokdwbwhks\",\"zcmrvexztvb\",\"qgsfraoyzkoow\",\"lmnguxaw\"],\"requiredZoneNames\":[\"dsyuuximerqfob\",\"yznkby\",\"utwpfhp\",\"gmhrskdsnfdsdoak\"]}") - .toObject(PrivateLinkResourceProperties.class); + PrivateLinkResourceProperties model = BinaryData.fromString( + "{\"groupId\":\"j\",\"requiredMembers\":[\"lfzxiavrmbzonoki\",\"rjqc\",\"rgz\"],\"requiredZoneNames\":[\"lazszrn\",\"oiindfpwpjy\",\"wbtlhflsjcdh\"]}") + .toObject(PrivateLinkResourceProperties.class); } @org.junit.jupiter.api.Test 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 73a4b707c96d..dd27864ea176 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 @@ -6,62 +6,32 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.PrivateLinkResource; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"properties\":{\"groupId\":\"velfcldu\",\"requiredMembers\":[\"irdsvuwcob\",\"egstmninwjizci\",\"nghgshej\",\"tbxqmuluxlxq\"],\"requiredZoneNames\":[\"ers\",\"ycucrwnamikzeb\"]},\"id\":\"bsmswziqgf\",\"name\":\"hokzrusw\",\"type\":\"vhczznvfby\"}"; - String responseStr = - "{\"properties\":{\"groupId\":\"ilrmcaykggnox\",\"requiredMembers\":[\"rksxwpndfc\"],\"requiredZoneNames\":[\"znth\",\"twk\"]},\"id\":\"osrxuzvoa\",\"name\":\"ktcqio\",\"type\":\"mgbzahgxqdlyrtl\"}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + PrivateLinkResource response = manager.privateLinkResources() + .getWithResponse("qwhix", "onsts", "i", com.azure.core.util.Context.NONE) + .getValue(); - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResource response = - manager - .privateLinkResources() - .getWithResponse("g", "wtxxpkyjcx", "jxgrytfmp", 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 a3464d5c0111..56959298a58f 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 @@ -6,60 +6,32 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.PrivateLinkResource; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateLinkResourcesListByPrivateLinkScopeMockTests { @Test public void testListByPrivateLinkScope() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); + String responseStr + = "{\"value\":[{\"properties\":{\"groupId\":\"xs\",\"requiredMembers\":[\"fujg\"],\"requiredZoneNames\":[\"aaoepttaqut\"]},\"id\":\"wemxswvruunzz\",\"name\":\"gehkfkimrtixokff\",\"type\":\"yinljqe\"}]}"; - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"i\",\"requiredMembers\":[\"umwmxqhnd\",\"noamldsehaohdj\"],\"requiredZoneNames\":[\"lzok\",\"coxpelnjeta\"]},\"id\":\"tsxoatftgz\",\"name\":\"npbs\",\"type\":\"vefloccsrmozihmi\"}]}"; + 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)); - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + PagedIterable response = manager.privateLinkResources() + .listByPrivateLinkScope("hkbffmbm", "zjrgyww", com.azure.core.util.Context.NONE); - 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.privateLinkResources().listByPrivateLinkScope("hczznvf", "ycjsx", 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 fc0e6c484e47..490a7981e7e8 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 @@ -14,26 +14,17 @@ public final class PrivateLinkScopeValidationDetailsInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkScopeValidationDetailsInner model = - BinaryData - .fromString( - "{\"id\":\"mouwqlgzrfzeey\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"ayuhqlbjbsy\",\"privateIpAddress\":\"qwrvtldgmfp\",\"linkIdentifier\":\"mpipaslthaqfxs\",\"groupId\":\"wutwbdsre\",\"memberName\":\"drhneuyow\"},{\"id\":\"d\",\"privateIpAddress\":\"t\",\"linkIdentifier\":\"ib\",\"groupId\":\"cgpik\",\"memberName\":\"imejzanl\"},{\"id\":\"xi\",\"privateIpAddress\":\"rmbzo\",\"linkIdentifier\":\"kixrj\",\"groupId\":\"irgzp\",\"memberName\":\"lazszrn\"},{\"id\":\"iin\",\"privateIpAddress\":\"pwp\",\"linkIdentifier\":\"lwbtlhf\",\"groupId\":\"jcdh\",\"memberName\":\"fjvfbgofeljagr\"}]}") - .toObject(PrivateLinkScopeValidationDetailsInner.class); + PrivateLinkScopeValidationDetailsInner model = BinaryData.fromString( + "{\"id\":\"eznoig\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"wkpnbsaz\",\"privateIpAddress\":\"joqkagfhsxt\",\"linkIdentifier\":\"ugzxnf\",\"groupId\":\"zpxdt\",\"memberName\":\"dm\"}]}") + .toObject(PrivateLinkScopeValidationDetailsInner.class); Assertions.assertEquals(PublicNetworkAccessType.DISABLED, model.publicNetworkAccess()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkScopeValidationDetailsInner model = - new PrivateLinkScopeValidationDetailsInner() - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED) - .withConnectionDetails( - Arrays - .asList( - new ConnectionDetail(), - new ConnectionDetail(), - new ConnectionDetail(), - new ConnectionDetail())); + PrivateLinkScopeValidationDetailsInner model + = new PrivateLinkScopeValidationDetailsInner().withPublicNetworkAccess(PublicNetworkAccessType.DISABLED) + .withConnectionDetails(Arrays.asList(new ConnectionDetail())); model = BinaryData.fromObject(model).toObject(PrivateLinkScopeValidationDetailsInner.class); Assertions.assertEquals(PublicNetworkAccessType.DISABLED, model.publicNetworkAccess()); } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesCreateOrUpdateWithResponseMockTests.java index 354f52fa8ed3..85f5b0e529d6 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 @@ -6,78 +6,46 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.HybridComputePrivateLinkScope; import com.azure.resourcemanager.hybridcompute.models.HybridComputePrivateLinkScopeProperties; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateLinkScopesCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"fwlwxjwetnps\",\"privateLinkScopeId\":\"clafzvaylpt\",\"privateEndpointConnections\":[{\"id\":\"wztcmwqkchc\",\"name\":\"axfe\",\"type\":\"jkjexf\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"hpsylkksh\",\"description\":\"bffmbmxz\"},\"provisioningState\":\"gywwpgjxs\",\"groupIds\":[\"fujg\"]}},{\"id\":\"gaao\",\"name\":\"ttaqutdew\",\"type\":\"xswvru\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"jgehkf\",\"description\":\"imrt\"},\"provisioningState\":\"okffqyinljqepqwh\",\"groupIds\":[\"onsts\",\"i\",\"xgvelfclduccbird\",\"vuwcobiegstmnin\"]}}]},\"location\":\"izcil\",\"tags\":{\"xqzv\":\"gshejjtbxqmulux\",\"ycucrwnamikzeb\":\"ers\"},\"id\":\"qbsms\",\"name\":\"ziqgfuh\",\"type\":\"kzruswh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - HybridComputePrivateLinkScope response = - manager - .privateLinkScopes() - .define("jphslhcaw") - .withRegion("l") - .withExistingResourceGroup("lxieixynllxecwcr") - .withTags(mapOf("iiznktwfan", "c", "dibmikostbzbkiwb", "nv")) - .withProperties( - new HybridComputePrivateLinkScopeProperties() - .withPublicNetworkAccess(PublicNetworkAccessType.ENABLED)) - .create(); - - Assertions.assertEquals("izcil", response.location()); - Assertions.assertEquals("gshejjtbxqmulux", response.tags().get("xqzv")); - Assertions.assertEquals(PublicNetworkAccessType.ENABLED, response.properties().publicNetworkAccess()); + String responseStr + = "{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"yjede\",\"privateLinkScopeId\":\"mlfmkqs\",\"privateEndpointConnections\":[{\"id\":\"awx\",\"name\":\"x\",\"type\":\"amwabzxrvxcushsp\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"mxyasflvgsgzw\",\"description\":\"wakoihkn\"},\"provisioningState\":\"jblmljhlnymz\",\"groupIds\":[\"yryuzcb\",\"qqvxmvwfgtayxons\",\"peujlzqn\",\"cvsql\"]}},{\"id\":\"zoibgsxg\",\"name\":\"fyq\",\"type\":\"mpqoxw\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"bxiqxeiiqbimht\",\"description\":\"wwinhehf\"},\"provisioningState\":\"ofvwbcb\",\"groupIds\":[\"b\",\"kbwvqvxkdiv\"]}},{\"id\":\"heb\",\"name\":\"swbzuwfmdurage\",\"type\":\"zvcjfelisdjubggb\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"xkbsazgakgac\",\"description\":\"rcmjdmspofapvuh\"},\"provisioningState\":\"lniofrzgbzje\",\"groupIds\":[\"tkvnlvxbcuiiznkt\"]}},{\"id\":\"ansnvp\",\"name\":\"bmikost\",\"type\":\"bkiw\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"yophz\",\"description\":\"yls\"},\"provisioningState\":\"rpfbcunezz\",\"groupIds\":[\"elfwy\",\"wl\",\"xjwet\"]}}]},\"location\":\"sihclafzvaylp\",\"tags\":{\"mwqkchcxwaxf\":\"qqwzt\"},\"id\":\"w\",\"name\":\"jkjexf\",\"type\":\"eqvhpsylkk\"}"; + + 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)); + + HybridComputePrivateLinkScope response = manager.privateLinkScopes() + .define("svtui") + .withRegion("jutifdwfmvigorqj") + .withExistingResourceGroup("sf") + .withTags(mapOf("n", "zhraglkafh")) + .withProperties( + new HybridComputePrivateLinkScopeProperties().withPublicNetworkAccess(PublicNetworkAccessType.ENABLED)) + .create(); + + Assertions.assertEquals("sihclafzvaylp", response.location()); + Assertions.assertEquals("qqwzt", response.tags().get("mwqkchcxwaxf")); + Assertions.assertEquals(PublicNetworkAccessType.DISABLED, response.properties().publicNetworkAccess()); } // Use "Map.of" if available diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesDeleteMockTests.java index 3fd9419966d9..0d510517c3d3 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 @@ -6,56 +6,28 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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 java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateLinkScopesDeleteMockTests { @Test public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + 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)); - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + manager.privateLinkScopes().delete("hpc", "fnmdxotn", com.azure.core.util.Context.NONE); - manager.privateLinkScopes().delete("fuojrngif", "rzpasccbiuimzdly", 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 b891d0319ef7..3ac11da7ade4 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 @@ -6,68 +6,37 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.HybridComputePrivateLinkScope; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateLinkScopesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"hpc\",\"privateLinkScopeId\":\"nmdxotngfd\",\"privateEndpointConnections\":[{\"id\":\"yzihgrkyuizabsn\",\"name\":\"pphoj\",\"type\":\"vyhyhsgzfc\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"mfg\",\"description\":\"eglqgleohibetn\"},\"provisioningState\":\"ankrrfxee\",\"groupIds\":[\"ij\"]}},{\"id\":\"cvbmqzb\",\"name\":\"xl\",\"type\":\"rnwxacevehjkuyxo\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"oqltfae\",\"description\":\"linmfgv\"},\"provisioningState\":\"r\",\"groupIds\":[\"riypoqeyhlqhyk\",\"rlpyznuciqdsmexi\",\"tdfuxt\",\"asiibmiybnnust\"]}},{\"id\":\"ljhnmgixhcmav\",\"name\":\"foudor\",\"type\":\"gyyprotwy\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"mbxhugcmjkav\",\"description\":\"gorbmftpm\"},\"provisioningState\":\"zfjltfvnzcyjto\",\"groupIds\":[\"opv\",\"bdb\"]}},{\"id\":\"gqqihedsvqwt\",\"name\":\"ky\",\"type\":\"cysihs\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"dhohsdtmcdzsuf\",\"description\":\"ohdxbzlmcmu\"},\"provisioningState\":\"cvhd\",\"groupIds\":[\"wqqxeysko\"]}}]},\"location\":\"zinkfkbgbzbowxeq\",\"tags\":{\"qkjjeokbz\":\"jmygvk\",\"czurtlei\":\"fezrx\",\"bkwvzg\":\"q\",\"bzdixzmq\":\"zvd\"},\"id\":\"noda\",\"name\":\"opqhewjptmc\",\"type\":\"sbostzel\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - HybridComputePrivateLinkScope response = - manager - .privateLinkScopes() - .getByResourceGroupWithResponse("dfqwmkyoq", "fdvruz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zinkfkbgbzbowxeq", response.location()); - Assertions.assertEquals("jmygvk", response.tags().get("qkjjeokbz")); + String responseStr + = "{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"yhyhsgzfczb\",\"privateLinkScopeId\":\"mfg\",\"privateEndpointConnections\":[{\"id\":\"qgleohibetnluank\",\"name\":\"fxeeebtijvacvbm\",\"type\":\"bqqxlaj\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"acevehjkuyx\",\"description\":\"afgaoqlt\"},\"provisioningState\":\"eyl\",\"groupIds\":[\"fgvxirpghriypoqe\",\"hlqhykprlpy\",\"nuciqdsmexiit\",\"fuxtyasiibmiybnn\"]}},{\"id\":\"tgnljhnmgixhcmav\",\"name\":\"foudor\",\"type\":\"gyyprotwy\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"mbxhugcmjkav\",\"description\":\"gorbmftpm\"},\"provisioningState\":\"zfjltfvnzcyjto\",\"groupIds\":[\"opv\",\"bdb\"]}}]},\"location\":\"gqqihedsvqwt\",\"tags\":{\"ihsgq\":\"yibcy\"},\"id\":\"wdhohsdtmcdzsu\",\"name\":\"cohdx\",\"type\":\"zlmcmuapcvhdb\"}"; + + 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)); + + HybridComputePrivateLinkScope response = manager.privateLinkScopes() + .getByResourceGroupWithResponse("fdgugeyzi", "grkyuizabsnmfpph", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("gqqihedsvqwt", response.location()); + Assertions.assertEquals("yibcy", response.tags().get("ihsgq")); Assertions.assertEquals(PublicNetworkAccessType.ENABLED, 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 9d097083feab..40ec262f6b53 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 @@ -6,65 +6,34 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.PrivateLinkScopeValidationDetails; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateLinkScopesGetValidationDetailsForMachineWithResponseMockTests { @Test public void testGetValidationDetailsForMachineWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"id\":\"qtferrqwexjkmf\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"gqqnobpudcda\",\"privateIpAddress\":\"qwpwyawbzasqbuc\",\"linkIdentifier\":\"gkyexaoguy\",\"groupId\":\"p\",\"memberName\":\"sdaultxij\"},{\"id\":\"mfqwa\",\"privateIpAddress\":\"nqnm\",\"linkIdentifier\":\"ngz\",\"groupId\":\"qxtbjwgnyf\",\"memberName\":\"fzsvtuikzh\"},{\"id\":\"qglcfhmlrqryxynq\",\"privateIpAddress\":\"rd\",\"linkIdentifier\":\"ovw\",\"groupId\":\"nptgoeiybba\",\"memberName\":\"fhvfsl\"},{\"id\":\"ntjlr\",\"privateIpAddress\":\"jkskyr\",\"linkIdentifier\":\"ovzidsx\",\"groupId\":\"abzmifrygznmmaxr\",\"memberName\":\"kzobgopxlhsln\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkScopeValidationDetails response = - manager - .privateLinkScopes() - .getValidationDetailsForMachineWithResponse("ewjwiuubw", "fqsfa", com.azure.core.util.Context.NONE) - .getValue(); + String responseStr + = "{\"id\":\"h\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"ehol\",\"privateIpAddress\":\"jwiuubwefqsfapaq\",\"linkIdentifier\":\"e\",\"groupId\":\"q\",\"memberName\":\"x\"},{\"id\":\"mfxapjwogqqno\",\"privateIpAddress\":\"udcdabtqwpwyawb\",\"linkIdentifier\":\"sqbuc\",\"groupId\":\"gkyexaoguy\",\"memberName\":\"p\"},{\"id\":\"sdaultxij\",\"privateIpAddress\":\"mfqwa\",\"linkIdentifier\":\"nqnm\",\"groupId\":\"ngz\",\"memberName\":\"qxtbjwgnyf\"}]}"; + + 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)); + + PrivateLinkScopeValidationDetails response = manager.privateLinkScopes() + .getValidationDetailsForMachineWithResponse("a", "zv", 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/PrivateLinkScopesGetValidationDetailsWithResponseMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/PrivateLinkScopesGetValidationDetailsWithResponseMockTests.java index 51d1c35fe0a5..eee730b0a519 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 @@ -6,65 +6,34 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.PrivateLinkScopeValidationDetails; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateLinkScopesGetValidationDetailsWithResponseMockTests { @Test public void testGetValidationDetailsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"id\":\"rbbpneqvcwwyy\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"ppr\",\"privateIpAddress\":\"snmokayzej\",\"linkIdentifier\":\"lbkpb\",\"groupId\":\"cpilj\",\"memberName\":\"hzvechndbnwieho\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkScopeValidationDetails response = - manager - .privateLinkScopes() - .getValidationDetailsWithResponse("dlat", "tmzlbiojlv", com.azure.core.util.Context.NONE) - .getValue(); + String responseStr + = "{\"id\":\"inkfkbgbz\",\"publicNetworkAccess\":\"Disabled\",\"connectionDetails\":[{\"id\":\"o\",\"privateIpAddress\":\"jmygvk\",\"linkIdentifier\":\"kjjeokbz\",\"groupId\":\"ezrxcczurtleipqx\",\"memberName\":\"wvz\"},{\"id\":\"zvd\",\"privateIpAddress\":\"zdix\",\"linkIdentifier\":\"q\",\"groupId\":\"odawopqhewjptmcg\",\"memberName\":\"ostzelndlatu\"},{\"id\":\"zlbiojlvfhrbbpn\",\"privateIpAddress\":\"vcwwyyurmochppr\",\"linkIdentifier\":\"snmokayzej\",\"groupId\":\"lbkpb\",\"memberName\":\"cpilj\"}]}"; + + 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)); + + PrivateLinkScopeValidationDetails response = manager.privateLinkScopes() + .getValidationDetailsWithResponse("v", "qqxeyskon", 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 16e5e17f645f..61af21458abe 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 @@ -6,68 +6,38 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.HybridComputePrivateLinkScope; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateLinkScopesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"gamquhiosrsjui\",\"privateLinkScopeId\":\"cdisyir\",\"privateEndpointConnections\":[{\"id\":\"czexrxzbujrtrhqv\",\"name\":\"evkh\",\"type\":\"lnzonzlrpiqywn\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"szcofizeht\",\"description\":\"hgbjkvrelje\"},\"provisioningState\":\"urvzmlovuanashc\",\"groupIds\":[\"mjerbdk\",\"lvidizozs\",\"bccxjmonfdgn\",\"n\"]}},{\"id\":\"puuw\",\"name\":\"tvuqjctzenkeifzz\",\"type\":\"kdasvflyhbxcudch\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"boldforobwj\",\"description\":\"vizbfhfo\"},\"provisioningState\":\"acqpbtuodxesza\",\"groupIds\":[\"l\",\"wumuaslzk\"]}},{\"id\":\"rwoycqucwyh\",\"name\":\"nomdrkywuhpsv\",\"type\":\"urut\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"xwlalniexzsrzpg\",\"description\":\"pqtybb\"},\"provisioningState\":\"pgdakchzyvli\",\"groupIds\":[\"rkcxkj\",\"bn\"]}},{\"id\":\"ysux\",\"name\":\"qrntv\",\"type\":\"ijpstte\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"pwcyyufmhr\",\"description\":\"nc\"},\"provisioningState\":\"mqspkcdqzhlctdd\",\"groupIds\":[\"ndy\"]}}]},\"location\":\"chrqb\",\"tags\":{\"qqoli\":\"rcgegydcwboxjum\"},\"id\":\"r\",\"name\":\"aiouaubrjt\",\"type\":\"oq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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.privateLinkScopes().listByResourceGroup("lcgqlsismj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("chrqb", response.iterator().next().location()); - Assertions.assertEquals("rcgegydcwboxjum", response.iterator().next().tags().get("qqoli")); - Assertions - .assertEquals( - PublicNetworkAccessType.DISABLED, response.iterator().next().properties().publicNetworkAccess()); + String responseStr + = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"vl\",\"privateLinkScopeId\":\"q\",\"privateEndpointConnections\":[{\"id\":\"xkjibnxmy\",\"name\":\"xs\",\"type\":\"rntvlwijp\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"xoqqpwcyyufmhrun\",\"description\":\"uwm\"},\"provisioningState\":\"pkcdqzhlct\",\"groupIds\":[\"nqndyfpchrqbn\",\"jrcg\",\"gydcw\",\"oxjumvqqo\"]}}]},\"location\":\"hrraiouaubrj\",\"tags\":{\"rzpasccbiuimzdly\":\"qxfuojrngif\"},\"id\":\"dfqwmkyoq\",\"name\":\"fdvruz\",\"type\":\"lzo\"}]}"; + + 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.privateLinkScopes().listByResourceGroup("tybbwwpgda", com.azure.core.util.Context.NONE); + + Assertions.assertEquals("hrraiouaubrj", response.iterator().next().location()); + Assertions.assertEquals("qxfuojrngif", response.iterator().next().tags().get("rzpasccbiuimzdly")); + Assertions.assertEquals(PublicNetworkAccessType.ENABLED, + 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 b34e6de0410f..2aa2f1f07534 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 @@ -6,68 +6,38 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.HybridComputePrivateLinkScope; import com.azure.resourcemanager.hybridcompute.models.PublicNetworkAccessType; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class PrivateLinkScopesListMockTests { @Test public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Disabled\",\"provisioningState\":\"ccknfnwmbtmvp\",\"privateLinkScopeId\":\"jdhttzaefedxi\",\"privateEndpointConnections\":[{\"id\":\"phkmcrjdqnsdfz\",\"name\":\"gtgkylkdghr\",\"type\":\"uutlwxezwzhok\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"hh\",\"description\":\"qlgehg\"},\"provisioningState\":\"ipifhpfeoajvg\",\"groupIds\":[\"xjcsheafidltu\",\"sr\",\"smkss\",\"h\"]}},{\"id\":\"ftxfkf\",\"name\":\"gpr\",\"type\":\"tillucbiqtg\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"mcwsldrizetpwb\",\"description\":\"a\"},\"provisioningState\":\"libph\",\"groupIds\":[\"mizak\",\"kan\",\"jpdn\"]}},{\"id\":\"ha\",\"name\":\"ylhjlm\",\"type\":\"y\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"mrsopte\",\"description\":\"cjmeislstvasy\"},\"provisioningState\":\"xdza\",\"groupIds\":[\"eoohguufuzboyj\",\"thwtzol\",\"a\",\"mwmdxmebwjscjpa\"]}}]},\"location\":\"xveabf\",\"tags\":{\"ijddtvqc\":\"mwmqtibx\",\"jaeukmrsieekpn\":\"tad\",\"pibudqwyxebeybpm\":\"zaapmudqmeqwi\"},\"id\":\"znrtffyaqit\",\"name\":\"hheioqaqhvseuf\",\"type\":\"qyrxp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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.privateLinkScopes().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xveabf", response.iterator().next().location()); - Assertions.assertEquals("mwmqtibx", response.iterator().next().tags().get("ijddtvqc")); - Assertions - .assertEquals( - PublicNetworkAccessType.DISABLED, response.iterator().next().properties().publicNetworkAccess()); + String responseStr + = "{\"value\":[{\"properties\":{\"publicNetworkAccess\":\"Enabled\",\"provisioningState\":\"rddga\",\"privateLinkScopeId\":\"uhiosrsju\",\"privateEndpointConnections\":[{\"id\":\"disyirnxz\",\"name\":\"zexrxzbujrt\",\"type\":\"qvwre\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"nlnzonzlrpi\",\"description\":\"yw\"},\"provisioningState\":\"vjtszcofize\",\"groupIds\":[\"hgbjkvrelje\",\"murvzm\",\"ov\"]}},{\"id\":\"nashcxlp\",\"name\":\"erbdk\",\"type\":\"vidizozsdb\",\"properties\":{\"privateEndpoint\":{},\"privateLinkServiceConnectionState\":{\"status\":\"monfdgnwncypuuww\",\"description\":\"tvuqjctzenkeifzz\"},\"provisioningState\":\"kdasvflyhbxcudch\",\"groupIds\":[\"rb\",\"ldforobwj\",\"vizbfhfo\"]}}]},\"location\":\"acqpbtuodxesza\",\"tags\":{\"wumuaslzk\":\"l\",\"mdr\":\"rrwoycqucwyhahn\"},\"id\":\"ywuhpsvfuur\",\"name\":\"tlwexxwlalniexz\",\"type\":\"rzpgep\"}]}"; + + 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.privateLinkScopes().list(com.azure.core.util.Context.NONE); + + Assertions.assertEquals("acqpbtuodxesza", response.iterator().next().location()); + Assertions.assertEquals("l", response.iterator().next().tags().get("wumuaslzk")); + Assertions.assertEquals(PublicNetworkAccessType.ENABLED, + 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 8c57b6da659e..0df6aa0ab188 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 @@ -13,33 +13,20 @@ public final class PrivateLinkScopesResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkScopesResource model = - BinaryData - .fromString( - "{\"location\":\"lfltka\",\"tags\":{\"akggkfpag\":\"efkdlf\",\"lyls\":\"owpulpq\",\"agxsdszuemps\":\"xkqjnsjervt\",\"nqicvinvkjjxdxrb\":\"zkfzbeyv\"},\"id\":\"ukzclewyhmlwpaz\",\"name\":\"zpof\",\"type\":\"cckwyfzqwhxxbu\"}") - .toObject(PrivateLinkScopesResource.class); - Assertions.assertEquals("lfltka", model.location()); - Assertions.assertEquals("efkdlf", model.tags().get("akggkfpag")); + PrivateLinkScopesResource model = BinaryData.fromString( + "{\"location\":\"jzraehtwdwrf\",\"tags\":{\"cdl\":\"iby\"},\"id\":\"h\",\"name\":\"hfwpracstwit\",\"type\":\"khevxccedc\"}") + .toObject(PrivateLinkScopesResource.class); + Assertions.assertEquals("jzraehtwdwrf", model.location()); + Assertions.assertEquals("iby", model.tags().get("cdl")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkScopesResource model = - new PrivateLinkScopesResource() - .withLocation("lfltka") - .withTags( - mapOf( - "akggkfpag", - "efkdlf", - "lyls", - "owpulpq", - "agxsdszuemps", - "xkqjnsjervt", - "nqicvinvkjjxdxrb", - "zkfzbeyv")); + PrivateLinkScopesResource model + = new PrivateLinkScopesResource().withLocation("jzraehtwdwrf").withTags(mapOf("cdl", "iby")); model = BinaryData.fromObject(model).toObject(PrivateLinkScopesResource.class); - Assertions.assertEquals("lfltka", model.location()); - Assertions.assertEquals("efkdlf", model.tags().get("akggkfpag")); + Assertions.assertEquals("jzraehtwdwrf", model.location()); + Assertions.assertEquals("iby", model.tags().get("cdl")); } // 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 99397fe82b7e..f0291820110f 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,21 +11,19 @@ public final class PrivateLinkServiceConnectionStatePropertyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionStateProperty model = - BinaryData - .fromString( - "{\"status\":\"patdooaojkniodko\",\"description\":\"ebwnujhe\",\"actionsRequired\":\"sbvdkcrodtjinfw\"}") + PrivateLinkServiceConnectionStateProperty model + = BinaryData.fromString("{\"status\":\"isxgfp\",\"description\":\"lolp\",\"actionsRequired\":\"ksrpqv\"}") .toObject(PrivateLinkServiceConnectionStateProperty.class); - Assertions.assertEquals("patdooaojkniodko", model.status()); - Assertions.assertEquals("ebwnujhe", model.description()); + Assertions.assertEquals("isxgfp", model.status()); + Assertions.assertEquals("lolp", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PrivateLinkServiceConnectionStateProperty model = - new PrivateLinkServiceConnectionStateProperty().withStatus("patdooaojkniodko").withDescription("ebwnujhe"); + PrivateLinkServiceConnectionStateProperty model + = new PrivateLinkServiceConnectionStateProperty().withStatus("isxgfp").withDescription("lolp"); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionStateProperty.class); - Assertions.assertEquals("patdooaojkniodko", model.status()); - Assertions.assertEquals("ebwnujhe", model.description()); + Assertions.assertEquals("isxgfp", model.status()); + Assertions.assertEquals("lolp", model.description()); } } diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductFeatureTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductFeatureTests.java new file mode 100644 index 000000000000..0a9c3516aaab --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductFeatureTests.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.core.util.BinaryData; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatus; +import com.azure.resourcemanager.hybridcompute.models.ProductFeature; +import org.junit.jupiter.api.Assertions; + +public final class ProductFeatureTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProductFeature model = BinaryData.fromString( + "{\"name\":\"rhpdjpjumas\",\"subscriptionStatus\":\"Unknown\",\"billingStartDate\":\"2021-05-13T06:58:13Z\",\"enrollmentDate\":\"2021-03-30T03:12:08Z\",\"disenrollmentDate\":\"2021-10-08T22:25:54Z\"}") + .toObject(ProductFeature.class); + Assertions.assertEquals("rhpdjpjumas", model.name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatus.UNKNOWN, model.subscriptionStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProductFeature model = new ProductFeature().withName("rhpdjpjumas") + .withSubscriptionStatus(LicenseProfileSubscriptionStatus.UNKNOWN); + model = BinaryData.fromObject(model).toObject(ProductFeature.class); + Assertions.assertEquals("rhpdjpjumas", model.name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatus.UNKNOWN, model.subscriptionStatus()); + } +} 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 new file mode 100644 index 000000000000..ce7392176d02 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductFeatureUpdateTests.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.LicenseProfileSubscriptionStatusUpdate; +import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; +import org.junit.jupiter.api.Assertions; + +public final class ProductFeatureUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProductFeatureUpdate model = BinaryData.fromString("{\"name\":\"pcesutrg\",\"subscriptionStatus\":\"Enable\"}") + .toObject(ProductFeatureUpdate.class); + Assertions.assertEquals("pcesutrg", model.name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProductFeatureUpdate model = new ProductFeatureUpdate().withName("pcesutrg") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE); + model = BinaryData.fromObject(model).toObject(ProductFeatureUpdate.class); + Assertions.assertEquals("pcesutrg", 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 new file mode 100644 index 000000000000..e64d6124774f --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ProductProfileUpdatePropertiesTests.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.util.BinaryData; +import com.azure.resourcemanager.hybridcompute.fluent.models.ProductProfileUpdateProperties; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileProductType; +import com.azure.resourcemanager.hybridcompute.models.LicenseProfileSubscriptionStatusUpdate; +import com.azure.resourcemanager.hybridcompute.models.ProductFeatureUpdate; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class ProductProfileUpdatePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProductProfileUpdateProperties model = BinaryData.fromString( + "{\"subscriptionStatus\":\"Enable\",\"productType\":\"WindowsServer\",\"productFeatures\":[{\"name\":\"ytxifqjzgxmrh\",\"subscriptionStatus\":\"Enable\"}]}") + .toObject(ProductProfileUpdateProperties.class); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); + Assertions.assertEquals("ytxifqjzgxmrh", model.productFeatures().get(0).name()); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, + model.productFeatures().get(0).subscriptionStatus()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProductProfileUpdateProperties model + = new ProductProfileUpdateProperties().withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE) + .withProductType(LicenseProfileProductType.WINDOWS_SERVER) + .withProductFeatures(Arrays.asList(new ProductFeatureUpdate().withName("ytxifqjzgxmrh") + .withSubscriptionStatus(LicenseProfileSubscriptionStatusUpdate.ENABLE))); + model = BinaryData.fromObject(model).toObject(ProductProfileUpdateProperties.class); + Assertions.assertEquals(LicenseProfileSubscriptionStatusUpdate.ENABLE, model.subscriptionStatus()); + Assertions.assertEquals(LicenseProfileProductType.WINDOWS_SERVER, model.productType()); + Assertions.assertEquals("ytxifqjzgxmrh", 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/ResourceProvidersUpgradeExtensionsMockTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceProvidersUpgradeExtensionsMockTests.java index 3b17ce8437b8..804cff66346e 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 @@ -6,70 +6,38 @@ import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; 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.ExtensionTargetProperties; import com.azure.resourcemanager.hybridcompute.models.MachineExtensionUpgrade; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; public final class ResourceProvidersUpgradeExtensionsMockTests { @Test public void testUpgradeExtensions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{}"; - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HybridComputeManager manager = - HybridComputeManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + 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)); - manager - .resourceProviders() - .upgradeExtensions( - "xundxgk", - "twzhhzjhfjmhv", + manager.resourceProviders() + .upgradeExtensions("bqvgaqv", "gafcqu", new MachineExtensionUpgrade() - .withExtensionTargets( - mapOf( - "yihsasbhudypohyu", new ExtensionTargetProperties().withTargetVersion("gpmuneqsxvmhfbuz"))), + .withExtensionTargets(mapOf("duy", new ExtensionTargetProperties().withTargetVersion("etnwsdtutnw"), + "kuqgsjjxundxgket", new ExtensionTargetProperties().withTargetVersion("uzhyrmewipmvekdx"))), com.azure.core.util.Context.NONE); + } // Use "Map.of" if available diff --git a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceUpdateTests.java b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceUpdateTests.java index 465be60fcd15..8ba7f84672fc 100644 --- a/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceUpdateTests.java +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/ResourceUpdateTests.java @@ -13,16 +13,16 @@ public final class ResourceUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceUpdate model = - BinaryData.fromString("{\"tags\":{\"lhmwhfpmrqobm\":\"uxzdxtay\"}}").toObject(ResourceUpdate.class); - Assertions.assertEquals("uxzdxtay", model.tags().get("lhmwhfpmrqobm")); + ResourceUpdate model = BinaryData.fromString("{\"tags\":{\"yofd\":\"kfpbs\",\"dttouwaboekqvkel\":\"luu\"}}") + .toObject(ResourceUpdate.class); + Assertions.assertEquals("kfpbs", model.tags().get("yofd")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceUpdate model = new ResourceUpdate().withTags(mapOf("lhmwhfpmrqobm", "uxzdxtay")); + ResourceUpdate model = new ResourceUpdate().withTags(mapOf("yofd", "kfpbs", "dttouwaboekqvkel", "luu")); model = BinaryData.fromObject(model).toObject(ResourceUpdate.class); - Assertions.assertEquals("uxzdxtay", model.tags().get("lhmwhfpmrqobm")); + Assertions.assertEquals("kfpbs", model.tags().get("yofd")); } // Use "Map.of" if available 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 000000000000..2d6741c7a633 --- /dev/null +++ b/sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/test/java/com/azure/resourcemanager/hybridcompute/generated/RunCommandInputParameterTests.java @@ -0,0 +1,27 @@ +// 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\":\"r\",\"value\":\"ea\"}").toObject(RunCommandInputParameter.class); + Assertions.assertEquals("r", model.name()); + Assertions.assertEquals("ea", model.value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RunCommandInputParameter model = new RunCommandInputParameter().withName("r").withValue("ea"); + model = BinaryData.fromObject(model).toObject(RunCommandInputParameter.class); + Assertions.assertEquals("r", model.name()); + Assertions.assertEquals("ea", 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 000000000000..b216986bdd0e --- /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\":\"ywsuwsy\",\"objectId\":\"ndsytgadg\"}") + .toObject(RunCommandManagedIdentity.class); + Assertions.assertEquals("ywsuwsy", model.clientId()); + Assertions.assertEquals("ndsytgadg", model.objectId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + RunCommandManagedIdentity model + = new RunCommandManagedIdentity().withClientId("ywsuwsy").withObjectId("ndsytgadg"); + model = BinaryData.fromObject(model).toObject(RunCommandManagedIdentity.class); + Assertions.assertEquals("ywsuwsy", model.clientId()); + Assertions.assertEquals("ndsytgadg", 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 087f62c2dc37..039b2c97ac9b 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,19 +11,17 @@ public final class ServiceStatusTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServiceStatus model = - BinaryData - .fromString("{\"status\":\"fmxa\",\"startupType\":\"fjpgddtocjjxhvp\"}") - .toObject(ServiceStatus.class); - Assertions.assertEquals("fmxa", model.status()); - Assertions.assertEquals("fjpgddtocjjxhvp", model.startupType()); + ServiceStatus model = BinaryData.fromString("{\"status\":\"ufizuckyf\",\"startupType\":\"rfidfvzwdz\"}") + .toObject(ServiceStatus.class); + Assertions.assertEquals("ufizuckyf", model.status()); + Assertions.assertEquals("rfidfvzwdz", model.startupType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceStatus model = new ServiceStatus().withStatus("fmxa").withStartupType("fjpgddtocjjxhvp"); + ServiceStatus model = new ServiceStatus().withStatus("ufizuckyf").withStartupType("rfidfvzwdz"); model = BinaryData.fromObject(model).toObject(ServiceStatus.class); - Assertions.assertEquals("fmxa", model.status()); - Assertions.assertEquals("fjpgddtocjjxhvp", model.startupType()); + Assertions.assertEquals("ufizuckyf", model.status()); + Assertions.assertEquals("rfidfvzwdz", 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 59f873ac5259..7b55bdb361d1 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 @@ -12,27 +12,24 @@ public final class ServiceStatusesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServiceStatuses model = - BinaryData - .fromString( - "{\"extensionService\":{\"status\":\"wzrlovmclwhij\",\"startupType\":\"ejctbzaqsqsycb\"},\"guestConfigurationService\":{\"status\":\"k\",\"startupType\":\"kdkexxp\"}}") - .toObject(ServiceStatuses.class); - Assertions.assertEquals("wzrlovmclwhij", model.extensionService().status()); - Assertions.assertEquals("ejctbzaqsqsycb", model.extensionService().startupType()); - Assertions.assertEquals("k", model.guestConfigurationService().status()); - Assertions.assertEquals("kdkexxp", model.guestConfigurationService().startupType()); + ServiceStatuses model = BinaryData.fromString( + "{\"extensionService\":{\"status\":\"szdnr\",\"startupType\":\"qguhmuo\"},\"guestConfigurationService\":{\"status\":\"prwzwbnguitnwui\",\"startupType\":\"a\"}}") + .toObject(ServiceStatuses.class); + Assertions.assertEquals("szdnr", model.extensionService().status()); + Assertions.assertEquals("qguhmuo", model.extensionService().startupType()); + Assertions.assertEquals("prwzwbnguitnwui", model.guestConfigurationService().status()); + Assertions.assertEquals("a", model.guestConfigurationService().startupType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceStatuses model = - new ServiceStatuses() - .withExtensionService(new ServiceStatus().withStatus("wzrlovmclwhij").withStartupType("ejctbzaqsqsycb")) - .withGuestConfigurationService(new ServiceStatus().withStatus("k").withStartupType("kdkexxp")); + ServiceStatuses model = new ServiceStatuses() + .withExtensionService(new ServiceStatus().withStatus("szdnr").withStartupType("qguhmuo")) + .withGuestConfigurationService(new ServiceStatus().withStatus("prwzwbnguitnwui").withStartupType("a")); model = BinaryData.fromObject(model).toObject(ServiceStatuses.class); - Assertions.assertEquals("wzrlovmclwhij", model.extensionService().status()); - Assertions.assertEquals("ejctbzaqsqsycb", model.extensionService().startupType()); - Assertions.assertEquals("k", model.guestConfigurationService().status()); - Assertions.assertEquals("kdkexxp", model.guestConfigurationService().startupType()); + Assertions.assertEquals("szdnr", model.extensionService().status()); + Assertions.assertEquals("qguhmuo", model.extensionService().startupType()); + Assertions.assertEquals("prwzwbnguitnwui", model.guestConfigurationService().status()); + Assertions.assertEquals("a", model.guestConfigurationService().startupType()); } } 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 88830ad82458..838656318d33 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\":\"q\"}").toObject(Subnet.class); - Assertions.assertEquals("q", model.addressPrefix()); + Subnet model = BinaryData.fromString("{\"addressPrefix\":\"shxmzsbbzoggigrx\"}").toObject(Subnet.class); + Assertions.assertEquals("shxmzsbbzoggigrx", model.addressPrefix()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Subnet model = new Subnet().withAddressPrefix("q"); + Subnet model = new Subnet().withAddressPrefix("shxmzsbbzoggigrx"); model = BinaryData.fromObject(model).toObject(Subnet.class); - Assertions.assertEquals("q", model.addressPrefix()); + Assertions.assertEquals("shxmzsbbzoggigrx", 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 5f5cd20da664..474fde8e6e31 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,16 +13,16 @@ public final class TagsResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TagsResource model = - BinaryData.fromString("{\"tags\":{\"ztppriolxorjalto\":\"xzfe\"}}").toObject(TagsResource.class); - Assertions.assertEquals("xzfe", model.tags().get("ztppriolxorjalto")); + TagsResource model + = BinaryData.fromString("{\"tags\":{\"vnhltiugcx\":\"dyodnwzxltj\"}}").toObject(TagsResource.class); + Assertions.assertEquals("dyodnwzxltj", model.tags().get("vnhltiugcx")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagsResource model = new TagsResource().withTags(mapOf("ztppriolxorjalto", "xzfe")); + TagsResource model = new TagsResource().withTags(mapOf("vnhltiugcx", "dyodnwzxltj")); model = BinaryData.fromObject(model).toObject(TagsResource.class); - Assertions.assertEquals("xzfe", model.tags().get("ztppriolxorjalto")); + Assertions.assertEquals("dyodnwzxltj", model.tags().get("vnhltiugcx")); } // 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 e095d9479d3b..4116e093d818 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 @@ -14,34 +14,30 @@ public final class WindowsParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - WindowsParameters model = - BinaryData - .fromString( - "{\"classificationsToInclude\":[\"UpdateRollUp\"],\"kbNumbersToInclude\":[\"odebfqkkrbmpu\",\"gr\",\"wflzlfbxzpuzy\",\"ispnqzahmgkbrp\"],\"kbNumbersToExclude\":[\"hibnuqqkpika\",\"rgvtqag\"],\"excludeKbsRequiringReboot\":false,\"maxPatchPublishDate\":\"2021-10-07T08:50:26Z\"}") - .toObject(WindowsParameters.class); - Assertions - .assertEquals(VMGuestPatchClassificationWindows.UPDATE_ROLL_UP, model.classificationsToInclude().get(0)); - Assertions.assertEquals("odebfqkkrbmpu", model.kbNumbersToInclude().get(0)); - Assertions.assertEquals("hibnuqqkpika", model.kbNumbersToExclude().get(0)); - Assertions.assertEquals(false, model.excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-07T08:50:26Z"), model.maxPatchPublishDate()); + WindowsParameters model = BinaryData.fromString( + "{\"classificationsToInclude\":[\"Critical\",\"Definition\"],\"kbNumbersToInclude\":[\"gnxytxhpzxbz\"],\"kbNumbersToExclude\":[\"abgl\",\"uhxwtctyqiklbbov\",\"lwzbhvgyugu\"],\"excludeKbsRequiringReboot\":true,\"maxPatchPublishDate\":\"2021-10-31T02:07:56Z\"}") + .toObject(WindowsParameters.class); + Assertions.assertEquals(VMGuestPatchClassificationWindows.CRITICAL, model.classificationsToInclude().get(0)); + Assertions.assertEquals("gnxytxhpzxbz", model.kbNumbersToInclude().get(0)); + Assertions.assertEquals("abgl", model.kbNumbersToExclude().get(0)); + Assertions.assertEquals(true, model.excludeKbsRequiringReboot()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-31T02:07:56Z"), model.maxPatchPublishDate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WindowsParameters model = - new WindowsParameters() - .withClassificationsToInclude(Arrays.asList(VMGuestPatchClassificationWindows.UPDATE_ROLL_UP)) - .withKbNumbersToInclude(Arrays.asList("odebfqkkrbmpu", "gr", "wflzlfbxzpuzy", "ispnqzahmgkbrp")) - .withKbNumbersToExclude(Arrays.asList("hibnuqqkpika", "rgvtqag")) - .withExcludeKbsRequiringReboot(false) - .withMaxPatchPublishDate(OffsetDateTime.parse("2021-10-07T08:50:26Z")); + WindowsParameters model = new WindowsParameters() + .withClassificationsToInclude( + Arrays.asList(VMGuestPatchClassificationWindows.CRITICAL, VMGuestPatchClassificationWindows.DEFINITION)) + .withKbNumbersToInclude(Arrays.asList("gnxytxhpzxbz")) + .withKbNumbersToExclude(Arrays.asList("abgl", "uhxwtctyqiklbbov", "lwzbhvgyugu")) + .withExcludeKbsRequiringReboot(true) + .withMaxPatchPublishDate(OffsetDateTime.parse("2021-10-31T02:07:56Z")); model = BinaryData.fromObject(model).toObject(WindowsParameters.class); - Assertions - .assertEquals(VMGuestPatchClassificationWindows.UPDATE_ROLL_UP, model.classificationsToInclude().get(0)); - Assertions.assertEquals("odebfqkkrbmpu", model.kbNumbersToInclude().get(0)); - Assertions.assertEquals("hibnuqqkpika", model.kbNumbersToExclude().get(0)); - Assertions.assertEquals(false, model.excludeKbsRequiringReboot()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-07T08:50:26Z"), model.maxPatchPublishDate()); + Assertions.assertEquals(VMGuestPatchClassificationWindows.CRITICAL, model.classificationsToInclude().get(0)); + Assertions.assertEquals("gnxytxhpzxbz", model.kbNumbersToInclude().get(0)); + Assertions.assertEquals("abgl", model.kbNumbersToExclude().get(0)); + Assertions.assertEquals(true, model.excludeKbsRequiringReboot()); + Assertions.assertEquals(OffsetDateTime.parse("2021-10-31T02:07:56Z"), model.maxPatchPublishDate()); } }